@Retention(value=CLASS) @Target(value={FIELD,METHOD,PARAMETER}) public @interface Pref
Injects an SharedPref annotated class in any enhanced class.
The field or method parameter MUST be of a type that is generated using SharedPref and
therefore extends
SharedPreferencesHelper.
Note: To prevent you from any building issues, you should use fully qualified name for the field type.
Example :
@EBean
public class MyBean {
@Pref
mypackage.MyPref_ myPref;
@Pref
void methodInjection(mypackage.MyPref_ myPref) {
// do stuff
}
}
package mypackage;
@SharedPref
public interface MyPref {
}
SharedPrefCopyright © 2010–2018 simpligility technologies inc.. All rights reserved.