|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ryanm.preflect.Preflect
public class Preflect
Handy utility for manipulating object trees that have been marked up with
Variable annotations
| Field Summary | |
|---|---|
static int |
ACTIVITY_REQUEST_FLAG
The activity request flag used in Activity#startActivityForResult(Intent, int) when launching the
configuration activity (value = 266344) |
static java.lang.String |
autoSaveName
The name under which applied configurations are automatically saved. |
static boolean |
errorOnNonPublicVariables
When true, a StructuralError will be thrown if a
private field or method is encountered with a Variable annotation,
when false, no error is raised and the variable is ignored. |
static java.lang.String |
LOG_TAG
Logging tag |
| Method Summary | |
|---|---|
static void |
applyDeferredConfigurations(java.lang.Object... configTargets)
Call this to apply configurations previously deferred in deferActivityResult(int, int, Intent) |
static void |
configure(Activity returnTo,
boolean showPersist,
boolean showConfirm,
java.lang.Object... roots)
|
static void |
deferActivityResult(int requestCode,
int resultCode,
Intent data)
Call this from your Activity.onActivityResult() instead of
onActivityResult(int, int, Intent, Object...) to save a
configuration for later application. |
static boolean |
onActivityResult(int requestCode,
int resultCode,
Intent data,
java.lang.Object... configTargets)
Call this from your activity in Activity .onActivityResult() to
apply a configuration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean errorOnNonPublicVariables
true, a StructuralError will be thrown if a
private field or method is encountered with a Variable annotation,
when false, no error is raised and the variable is ignored.
Default value is true
public static java.lang.String autoSaveName
null to disable automatic saving
public static final java.lang.String LOG_TAG
public static final int ACTIVITY_REQUEST_FLAG
Activity#startActivityForResult(Intent, int) when launching the
configuration activity (value = 266344)
| Method Detail |
|---|
public static void configure(Activity returnTo,
boolean showPersist,
boolean showConfirm,
java.lang.Object... roots)
returnTo - The activity to return to when we are done configuringshowPersist - When true, the user will be able manually save
multiple different configurations.showConfirm - When true, the user will have to confirm or cancel
configuration changes before leaving the generated
PreferenceActivity. This might be useful if the
preference hierarchy is deep and the user risks prematurely
leaving the activity by accidentroots - The (annotated) objects to configure.
public static boolean onActivityResult(int requestCode,
int resultCode,
Intent data,
java.lang.Object... configTargets)
Activity .onActivityResult() to
apply a configuration
requestCode - from Activity.onActivityResult()resultCode - from Activity.onActivityResult()data - from Activity.onActivityResult()configTargets - roots of the object trees to apply configurations to
true if the configuration was applied,
false otherwise
public static void deferActivityResult(int requestCode,
int resultCode,
Intent data)
Activity.onActivityResult() instead of
onActivityResult(int, int, Intent, Object...) to save a
configuration for later application. This is useful if your configuration
changes need to be done in a particular thread like, for example, OpenGL
stuff
requestCode - from Activity.onActivityResult()resultCode - from Activity.onActivityResult()data - from Activity.onActivityResult()public static void applyDeferredConfigurations(java.lang.Object... configTargets)
deferActivityResult(int, int, Intent)
configTargets - roots of the object trees to apply configurations to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||