|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.ioc.rebind.ioc.injector.InjectUtil
public class InjectUtil
Nested Class Summary | |
---|---|
static class |
InjectUtil.AbstractBeanMetric
|
static interface |
InjectUtil.BeanMetric
|
Constructor Summary | |
---|---|
InjectUtil()
|
Method Summary | |
---|---|
static InjectUtil.BeanMetric |
analyzeBean(InjectionContext context,
MetaClass clazz)
|
static boolean |
checkIfTypeNeedsAddingToBeanStore(InjectionContext context,
Injector injector)
|
static Statement |
createDestructionCallback(MetaClass type,
String initVar,
List<Statement> statementList)
|
static Statement |
createInitializationCallback(MetaClass type,
String initVar,
List<Statement> statementList)
|
static List<Annotation> |
extractQualifiers(InjectableInstance<? extends Annotation> injectableInstance)
|
static Set<Injector> |
getBeanInjectionTrackStore(InjectionContext context)
A utility to get or create the store whereby the code that binds beans to the client bean manager can keep track of what it has already bound. |
static ConstructionStrategy |
getConstructionStrategy(Injector injector,
InjectionContext ctx)
|
static InjectUtil.BeanMetric |
getFilteredBeanMetric(InjectionContext context,
MetaClass clazz,
Class<? extends Annotation> annotatedWith)
|
static Statement |
getInjectorOrProxy(InjectionContext ctx,
InjectableInstance injectableInstance,
MetaClass clazz,
QualifyingMetadata qualifyingMetadata)
|
static Statement |
getInjectorOrProxy(InjectionContext ctx,
InjectableInstance injectableInstance,
MetaClass clazz,
QualifyingMetadata qualifyingMetadata,
boolean alwaysProxyDependent)
|
static String |
getNewInjectorName()
|
static ProxyInjector |
getOrCreateProxy(InjectionContext ctx,
MetaClass clazz,
QualifyingMetadata qualifyingMetadata)
|
static Statement |
getPrivateFieldValue(org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessingContext processingContext,
Statement obj,
MetaField field)
Retrieves the value of a private field managed IOC component. |
static Statement |
getPublicOrPrivateFieldValue(InjectionContext context,
Statement obj,
MetaField field)
Read from the specified field, and automatically determine whether to make a public or private read based on the visibility of the specified field. |
static List<Annotation> |
getQualifiersFromAnnotations(Annotation[] annotations)
|
static Annotation[] |
getQualifiersFromAnnotationsAsArray(Annotation[] annotations)
|
static String |
getUniqueVarName()
|
static String |
getVarNameFromType(MetaClass clazz,
InjectableInstance instance)
|
static String |
getVarNameFromType(MetaClass clazz,
MetaField parameter)
|
static String |
getVarNameFromType(MetaClass clazz,
MetaParameter parameter)
|
static Statement |
invokePrivateMethod(org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessingContext processingContext,
Statement obj,
MetaMethod method,
Statement... arguments)
Invokes a private method on a managed IOC component. |
static Statement |
invokePublicOrPrivateMethod(InjectionContext context,
Statement obj,
MetaMethod method,
Statement... arguments)
Invoke the specified method, and automatically determine whether to make the invocation public or private based on the visibility of the specified method. |
static Statement[] |
resolveInjectionDependencies(MetaParameter[] parms,
InjectionContext ctx,
MetaConstructor constructor)
|
static Statement[] |
resolveInjectionDependencies(MetaParameter[] parms,
InjectionContext ctx,
MetaMethod method)
|
static Statement[] |
resolveInjectionDependencies(MetaParameter[] parms,
InjectionContext ctx,
MetaMethod method,
boolean inlineReference)
|
static List<MetaMethod> |
scanForAnnotatedMethod(MetaClass type,
Class<? extends Annotation> annotationType)
|
static Statement |
setPrivateFieldValue(org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessingContext processingContext,
Statement obj,
MetaField field,
Statement val)
Set the value of a private field on a managed IOC component. |
static Statement |
setPublicOrPrivateFieldValue(InjectionContext context,
Statement obj,
MetaField field,
Statement val)
Write to the specified field, and automatically determine whether to make a public or private write based on the visibility of the specified field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InjectUtil()
Method Detail |
---|
public static ConstructionStrategy getConstructionStrategy(Injector injector, InjectionContext ctx)
public static List<MetaMethod> scanForAnnotatedMethod(MetaClass type, Class<? extends Annotation> annotationType)
public static Statement getInjectorOrProxy(InjectionContext ctx, InjectableInstance injectableInstance, MetaClass clazz, QualifyingMetadata qualifyingMetadata)
public static Statement getInjectorOrProxy(InjectionContext ctx, InjectableInstance injectableInstance, MetaClass clazz, QualifyingMetadata qualifyingMetadata, boolean alwaysProxyDependent)
public static ProxyInjector getOrCreateProxy(InjectionContext ctx, MetaClass clazz, QualifyingMetadata qualifyingMetadata)
public static Statement[] resolveInjectionDependencies(MetaParameter[] parms, InjectionContext ctx, MetaMethod method)
public static Statement[] resolveInjectionDependencies(MetaParameter[] parms, InjectionContext ctx, MetaMethod method, boolean inlineReference)
public static Statement[] resolveInjectionDependencies(MetaParameter[] parms, InjectionContext ctx, MetaConstructor constructor)
public static String getNewInjectorName()
public static String getUniqueVarName()
public static String getVarNameFromType(MetaClass clazz, MetaParameter parameter)
public static String getVarNameFromType(MetaClass clazz, MetaField parameter)
public static String getVarNameFromType(MetaClass clazz, InjectableInstance instance)
public static List<Annotation> extractQualifiers(InjectableInstance<? extends Annotation> injectableInstance)
public static List<Annotation> getQualifiersFromAnnotations(Annotation[] annotations)
public static Annotation[] getQualifiersFromAnnotationsAsArray(Annotation[] annotations)
public static InjectUtil.BeanMetric analyzeBean(InjectionContext context, MetaClass clazz)
public static InjectUtil.BeanMetric getFilteredBeanMetric(InjectionContext context, MetaClass clazz, Class<? extends Annotation> annotatedWith)
public static Statement createInitializationCallback(MetaClass type, String initVar, List<Statement> statementList)
public static Statement createDestructionCallback(MetaClass type, String initVar, List<Statement> statementList)
public static Set<Injector> getBeanInjectionTrackStore(InjectionContext context)
public static boolean checkIfTypeNeedsAddingToBeanStore(InjectionContext context, Injector injector)
public static Statement getPrivateFieldValue(org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessingContext processingContext, Statement obj, MetaField field)
processingContext
- an instance of the IOCProcessingContext
obj
- a Statement
reference to the bean instance whose field is to be accessed.
null can be provided for static field access.field
- the MetaField
which will be privately accessed
Statement
reference to the value of the field.public static Statement setPrivateFieldValue(org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessingContext processingContext, Statement obj, MetaField field, Statement val)
processingContext
- an instance of the IOCProcessingContext
obj
- a Statement
reference to the bean instance whose field is to be accessed.
null can be provided for static field access.field
- the MetaField
which will be privately accessedval
- the Statement
reference to the value to be set.
Statement
which will perform the writing to the field.public static Statement invokePrivateMethod(org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCProcessingContext processingContext, Statement obj, MetaMethod method, Statement... arguments)
processingContext
- an instance of the IOCProcessingContext
obj
- a Statement
reference to the bean instance whose field is to be accessed.
null can be provided for static method calls.method
- the MetaMethod
to be invokedarguments
- the arguments to be passed to the private method
Statement
which represents the return value of the method.public static Statement getPublicOrPrivateFieldValue(InjectionContext context, Statement obj, MetaField field)
context
- an instance of the InjectionContext
obj
- a Statement
reference to the bean instance whose field is to be accessedfield
- the MetaField
which will be privately accessed
Statement
reference to the value of the field.public static Statement setPublicOrPrivateFieldValue(InjectionContext context, Statement obj, MetaField field, Statement val)
context
- an instance of the InjectionContext
obj
- a Statement
reference to the bean instance whose field is to be accessedfield
- the MetaField
which will be privately accessedval
- the Statement
reference to the value to be set.
Statement
which will perform the writing to the field.public static Statement invokePublicOrPrivateMethod(InjectionContext context, Statement obj, MetaMethod method, Statement... arguments)
context
- an instance of the InjectionContext
obj
- a Statement
reference to the bean instance whose field is to be accessedmethod
- the MetaMethod
to be invokedarguments
- the arguments to be passed to the private method
Statement
which represents the return value of the method.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |