|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=CLASS) @Target(value=TYPE) public @interface EApplication
Should be used on Application
classes to enable usage of
AndroidAnnotations.
AfterInject
annotated method.
If the class is abstract, the enhanced application will not be generated.
Otherwise, it will be generated as a final class. You can use
AndroidAnnotations to create Abstract classes that handle common code.
Most annotations are supported in EApplication
classes, except the
ones related to views and extras.
The enhanced application can also be injected in any enhanced class by using
App
annotation.
Example :@EApplication public class MyApplication extends Application { @Bean MyBean myBean; @AfterInject void init() { myBean.doSomeStuff(); } } @EBean public class MyBean { @App MyApplication myApp; }
AfterInject
,
App
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |