public class LoadingDemoActivity extends AppCompatActivity {
@FROM_LOADING
@AutoBundleField
int mFrom;
private static final int FROM_HOME_LOADING = 1;
private static final int FROM_OTHER_LOADING = 2;
@IntDef({FROM_HOME_LOADING, FROM_OTHER_LOADING})
@Retention(RetentionPolicy.SOURCE)
public @interface FROM_LOADING {
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loading_demo);
AutoBundle.bind(this);
switch (mFrom) {
case FROM_HOME_LOADING:
// TODO: 2016/12/9
break;
case FROM_OTHER_LOADING:
// TODO: 2016/12/9
break;
default:
break;
}
}
}
but the createIntentBuilder(int mFrom) has not the @FROM_LOADING
// ...
public static LoadingDemoActivityAutoBundle.IntentBuilder createIntentBuilder(int mFrom) {
return new LoadingDemoActivityAutoBundle.IntentBuilder(mFrom);
}
// ...
public static final class IntentBuilder {
final Bundle args;
public IntentBuilder(int mFrom) {
this.args = new Bundle();
this.args.putInt("mFrom", mFrom);
}
// ...
}
I expected the generated source:
// ...
public static LoadingDemoActivityAutoBundle.IntentBuilder createIntentBuilder(@FROM_LOADING int mFrom) {
return new LoadingDemoActivityAutoBundle.IntentBuilder(mFrom);
}
// ...
public static final class IntentBuilder {
final Bundle args;
public IntentBuilder(@FROM_LOADING int mFrom) {
this.args = new Bundle();
this.args.putInt("mFrom", mFrom);
}
// ...
}
I defined a @IntDef anntations
@FROM_LOADING
:but the
createIntentBuilder(int mFrom)
has not the@FROM_LOADING
I expected the generated source:
can you add the annotation to generated sources?