org.cruxframework.crux.core.client.ioc
Annotation Type IoCResource


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface IoCResource

This annotation can be used to bind a type to CruxIocContainer

For example, see the following class:

 @IoCResource
 public class MyClass
 {
    @Inject
    private MyService service; 
 }
 

Author:
Thiago da Rosa de Bustamante

Optional Element Summary
 Class<?> bindClass
          The implementation class created for the annotated class.
 Class<? extends IocProvider<?>> provider
          A provider to instantiate the objects for the annotated class.
 boolean runtimeAccessible
          If true, the annotated class would be accessible by IoCContainer at runtime.
 IoCResource.Scope scope
          Defines the scope where the created object will be saved
 

provider

public abstract Class<? extends IocProvider<?>> provider
A provider to instantiate the objects for the annotated class.

Returns:
Default:
org.cruxframework.crux.core.client.ioc.IoCResource.NoProvider.class

bindClass

public abstract Class<?> bindClass
The implementation class created for the annotated class. If empty, the own class will be used.

Default:
org.cruxframework.crux.core.client.ioc.IoCResource.NoClass.class

runtimeAccessible

public abstract boolean runtimeAccessible
If true, the annotated class would be accessible by IoCContainer at runtime.

Default:
false

scope

public abstract IoCResource.Scope scope
Defines the scope where the created object will be saved

Default:
org.cruxframework.crux.core.client.ioc.IoCResource.Scope.LOCAL


Copyright © 2014. All rights reserved.