|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=CLASS) @Target(value=TYPE) public @interface SharedPref
Apply @SharedPref
on an interface to create a SharedPreference helper
that will contain access methods related to the methods you define in the
interface.
Pref
annotation.
Example :@EBean public class MyBean { @Pref mypackage.MyPref_ myPref; } package mypackage; @SharedPref public interface MyPref { // The field name will have default value "John" @DefaultString("John") String name(); // The field age will have default value 42 @DefaultInt(42) int age(); // The field lastUpdated will have default value 0 long lastUpdated(); }
Pref
Optional Element Summary | |
---|---|
int |
mode
|
SharedPref.Scope |
value
|
public abstract SharedPref.Scope value
public abstract int mode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |