@InjectTag @Retention(value=RUNTIME) @Target(value={FIELD,PARAMETER}) @LoadCollection(value=TypedElementLoader.class) public @interface TypeOf
Mark elements of a field or method parameter should be type of specified base class or interface.
LoadCollection| Modifier and Type | Optional Element and Description |
|---|---|
ElementType |
elementType
Specify the type of element the loader should return
|
boolean |
loadAbstract
Should the loader load abstract class or not
|
boolean |
loadNonPublic
Should the loader load non-public class or not
|
boolean |
loadRoot
Should the loader load Class/Bean using the class specified by
value(). |
Class<?> |
value
Specify the base class or interface.
|
public abstract Class<?> value
Specify the base class or interface.
Default value is TypeOf.PlaceHolder. When default value is used it directs the genie to use element’ type parameter
public abstract ElementType elementType
Specify the type of element the loader should return
Note when the generic type of element is Class<...> the value of elementType will always be treated as ElementType.CLASS and user setting through this property will be ignored
public abstract boolean loadNonPublic
Should the loader load non-public class or not
true or false as described abovepublic abstract boolean loadAbstract
Should the loader load abstract class or not
Note the value of loadAbstract will be ignored if elementType() is set to ElementType.BEAN
true or false as described above.public abstract boolean loadRoot
Should the loader load Class/Bean using the class specified by value(). If specified as false then it shall load purely sub type of the type specified, otherwise it might load the specified type if:
elementType() is ElementType.CLASSelementType() is ElementType.BEAN and the specified type is non-static class and can initializedtrue or false as described aboveCopyright © 2016–2018 OSGL (Open Source General Library). All rights reserved.