Skip to content

Commit 3604768

Browse files
committed
Some problems in the period of annotation are repaired.
1 parent 94c2704 commit 3604768

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

mvvm/src/main/java/com/wutaodsg/mvvm/component/LineDivider.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
import android.support.v7.widget.RecyclerView;
1111
import android.view.View;
1212

13+
import java.lang.annotation.ElementType;
14+
import java.lang.annotation.Retention;
15+
import java.lang.annotation.RetentionPolicy;
16+
import java.lang.annotation.Target;
17+
1318
/**
1419
* 线性分割线,用在 RecyclerView 中,可以是水平或垂直的。<br/>
1520
* 原理参见 http://www.jianshu.com/p/4eff036360da
@@ -87,6 +92,8 @@ private void drawVerticalLine(Canvas c, RecyclerView parent) {
8792
}
8893

8994

95+
@Retention(RetentionPolicy.SOURCE)
96+
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
9097
@IntDef({LinearLayoutManager.VERTICAL, LinearLayoutManager.HORIZONTAL})
9198
@interface OrientationType {
9299
}

mvvm/src/main/java/com/wutaodsg/mvvm/core/ChildView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public final ViewGroup getContainer() {
275275

276276

277277
@IntDef({PARENT_TYPE_ACTIVITY, PARENT_TYPE_FRAGMENT})
278-
@Retention(RetentionPolicy.RUNTIME)
278+
@Retention(RetentionPolicy.SOURCE)
279279
@Target({ElementType.FIELD, ElementType.METHOD})
280280
public @interface ParentType {
281281
}

mvvm/src/main/java/com/wutaodsg/mvvm/util/log/LogUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public static void e(String tag, String msg, Throwable throwable) {
142142
}
143143

144144

145-
@Retention(RetentionPolicy.RUNTIME)
145+
@Retention(RetentionPolicy.SOURCE)
146146
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
147147
@IntDef({VERBOSE, DEBUG, INFO, WARN, ERROR, NOTHING})
148148
@interface LevelType {}

0 commit comments

Comments
 (0)