@Retention(value=CLASS)
@Target(value=TYPE)
public @interface EApplication
Should be used on Application
classes to enable usage of
AndroidAnnotations.
Your code related to injected beans should go in an 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
Copyright © 2010-2014. All Rights Reserved.