本文整理了Java中org.androidannotations.annotations.Bean.<init>()
方法的一些代码示例,展示了Bean.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bean.<init>()
方法的具体详情如下:
包路径:org.androidannotations.annotations.Bean
类名称:Bean
方法名:<init>
暂无
代码示例来源:origin: androidannotations/androidannotations
protected void injectMultipleDependencies(@Bean EmptyDependency multiDependency, @Bean(SomeImplementation.class) SomeInterface multiDependencyInterface,
@Bean SomeSingleton multiDependencySingleton) {
this.multiDependency = multiDependency;
this.multiDependencyInterface = multiDependencyInterface;
this.multiDependencySingleton = multiDependencySingleton;
}
}
代码示例来源:origin: androidannotations/androidannotations
@Bean
protected void injectDependency(EmptyDependency methodInjectedDependency) {
this.methodInjectedDependency = methodInjectedDependency;
}
代码示例来源:origin: androidannotations/androidannotations
protected void injectDependencyAnnotatedParam(@Bean EmptyDependency annotatedParamDependency) {
this.annotatedParamDependency = annotatedParamDependency;
}
代码示例来源:origin: androidannotations/androidannotations
@Bean(SomeImplementation.class)
protected void injectInterface(SomeInterface methodInjectedInterface) {
this.methodInjectedInterface = methodInjectedInterface;
}
代码示例来源:origin: androidannotations/androidannotations
@Bean
protected void injectSingleton(SomeSingleton methodInjectedSingleton) {
this.methodInjectedSingleton = methodInjectedSingleton;
}
代码示例来源:origin: androidannotations/androidannotations
protected void injectSingletonAnnotatedParam(@Bean SomeSingleton annotatedParamSingleton) {
this.annotatedParamSingleton = annotatedParamSingleton;
}
代码示例来源:origin: androidannotations/androidannotations
protected void injectInterfaceAnnotatedParam(@Bean(SomeImplementation.class) SomeInterface annotatedParamInterface) {
this.annotatedParamInterface = annotatedParamInterface;
}
代码示例来源:origin: androidannotations/androidannotations
@EActivity(R.layout.main)
public class AfterViewsActivity extends Activity {
@Bean
AfterViewBean afterViewBean;
public boolean afterViewBeanCalledBefore = false;
@AfterViews
void afterViews() {
afterViewBeanCalledBefore = afterViewBean.afterViewsCalled;
}
}
代码示例来源:origin: androidannotations/androidannotations
@EApplication
public class SampleRoboApplication extends Application {
@Bean
public EmptyDependency someDependency;
}
代码示例来源:origin: androidannotations/androidannotations
@EFragment
public abstract class AbstractFragment extends Fragment {
@Bean
SomeBean someBean;
}
代码示例来源:origin: androidannotations/androidannotations
@EBean(scope = EBean.Scope.Singleton)
public class SomeCyclicSingletonA {
@Bean
SomeCyclicSingletonB singletonB;
}
代码示例来源:origin: androidannotations/androidannotations
@EBean(scope = EBean.Scope.Singleton)
public class SomeCyclicSingletonB {
@Bean
SomeCyclicSingletonA singletonA;
}
代码示例来源:origin: androidannotations/androidannotations
@EIntentService
public class MyIntentService extends AbstractIntentService {
@Bean
EnhancedClass dependency;
public MyIntentService() {
super(MyIntentService.class.getSimpleName());
}
@ServiceAction
void myAction() {
}
@ServiceAction
void actionOne(String valueString) {
}
@ServiceAction("myAction")
void actionThree(String valueString, long valueLong) {
}
}
代码示例来源:origin: androidannotations/androidannotations
BeanWithInnerEnhancedClasses_.InnerPrefs_ innerPrefs;
@Bean
InnerEnhancedBean innerEnhancedBean;
@Bean
SomeImplementation someImplementation;
代码示例来源:origin: androidannotations/androidannotations
@Bean
EnhancedClass dependency;
代码示例来源:origin: androidannotations/androidannotations
@Bean
@NonConfigurationInstance
EmptyDependency maintainedDependency;
@Bean
EmptyDependency recreatedDependency;
@Bean(SomeImplementation.class)
@NonConfigurationInstance
SomeInterface maintainedAbstracted;
代码示例来源:origin: androidannotations/androidannotations
@EReceiver
public class MyReceiver extends BroadcastReceiver {
@SystemService
NotificationManager notificationManager;
@Bean
EnhancedClass dependency;
@Override
public void onReceive(Context context, Intent intent) {
showToast(context);
workInBackground();
}
@Trace
@UiThread
void showToast(Context context) {
Toast.makeText(context, "Hello World!", Toast.LENGTH_LONG).show();
}
@Trace
@Background
void workInBackground() {
Log.d(MyService.class.getSimpleName(), "Doing some background work.");
}
}
代码示例来源:origin: androidannotations/androidannotations
@EBean(scope = Scope.Singleton)
public class SomeSingleton {
@RootContext
public Context context;
/*
* Should not be injected (singleton)
*/
@ViewById
public View myTextView;
@Bean
public BeanWithView beanWithView;
}
代码示例来源:origin: androidannotations/androidannotations
@EActivity
public class MyActivity extends Activity {
@OrmLiteDao(helper = DatabaseHelper.class)
UserDao userDao;
@OrmLiteDao(helper = DatabaseHelper.class)
Dao<Car, Long> carDao;
@OrmLiteDao(helper = DatabaseHelper.class)
UserRuntimeExceptionDao userRuntimeExceptionDao;
@OrmLiteDao(helper = DatabaseHelper.class)
RuntimeExceptionDao<Car, Long> runtimeExceptionDao;
@Bean
MyBean ormLiteBean;
}
代码示例来源:origin: androidannotations/androidannotations
@EActivity(R.layout.support_fragments)
public class MySupportFragmentActivity extends FragmentActivity {
@FragmentById
public MySupportFragment mySupportFragment;
@FragmentById(R.id.mySupportFragment)
public MySupportFragment mySupportFragment2;
@FragmentByTag
public MySupportFragment mySupportFragmentTag;
@FragmentByTag("mySupportFragmentTag")
public MySupportFragment mySupportFragmentTag2;
@Bean
public BeanWithSupportFragments beanWithSupportFragments;
}
内容来源于网络,如有侵权,请联系作者删除!