org.jboss.errai.ioc.rebind.ioc.injector.api
Class InjectionPoint<T>
java.lang.Object
org.jboss.errai.ioc.rebind.ioc.injector.api.InjectionPoint<T>
- Direct Known Subclasses:
- InjectableInstance
public class InjectionPoint<T>
- extends Object
- Author:
- Mike Brock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
annotation
protected T annotation
taskType
protected TaskType taskType
constructor
protected MetaConstructor constructor
method
protected MetaMethod method
field
protected MetaField field
type
protected MetaClass type
parm
protected MetaParameter parm
injector
protected Injector injector
injectionContext
protected InjectionContext injectionContext
InjectionPoint
public InjectionPoint(T annotation,
TaskType taskType,
MetaConstructor constructor,
MetaMethod method,
MetaField field,
MetaClass type,
MetaParameter parm,
Injector injector,
InjectionContext injectionContext)
getAnnotation
public T getAnnotation()
getRawAnnotation
public Annotation getRawAnnotation()
getConstructor
public MetaConstructor getConstructor()
getTaskType
public TaskType getTaskType()
getMethod
public MetaMethod getMethod()
getField
public MetaField getField()
getElementTypeOrMethodReturnType
public MetaClass getElementTypeOrMethodReturnType()
- Returns the element type or a method return type, based on what the injection point is.
Parameters:
public class MyClass {
public void MyClass(@A Set set) {
}
public void setMethod(Foo foo, @B Bar t) {
}
}
If the element being decorated is the parameter where @A represents the injection/decorator point,
then the type returned by this method will be Set. If the element being decorated is the parameter
where @B represents the injection point, then the type returned by this method will be Bar.
Fields:
public class MyClass {
@A private Map myField;
}
If the element being decorated is the field where @A represents the injection/decorator point,
then the type returned by this method wil be Map.
Methods:
public class MyClass {
@A private List getList() {
}
@B private void doSomething() {
}
}
If the element being decorated is the method where @A represents the injection/decorator point,
then the type returned by this method will be List. If the element being decorated is the method
where @B represents the injection/decorator point, then the type returned by this method will be
void.
Constructor and Types:
@A
public class MyClass {
@B
public MyClass() {
}
}
If the class element being decorated is the method where @A represents the injection/decorator point,
then the type returned by this method will be MyClass. Also, if the constructor element being
decorated is the constructor where @B represents the injection/decorator point, then the type
returned by this method will be MyClass.
- Returns:
- The underlying type of the element or return type for a method.
getElementType
public MetaClass getElementType()
getParm
public MetaParameter getParm()
- Returns the parameter reference if the injection point is a parameter, otherwise returns null.
- Returns:
- the
MetaParameter
reference if the injection point is a parameter, otherwise null.
getInjector
public Injector getInjector()
- Returns the
Injector
reference for the the bean
- Returns:
getInjectionContext
public InjectionContext getInjectionContext()
ensureMemberExposed
public void ensureMemberExposed()
ensureMemberExposed
public void ensureMemberExposed(PrivateAccessType accessType)
getMemberName
public String getMemberName()
getEnclosingType
public MetaClass getEnclosingType()
getQualifiers
public Annotation[] getQualifiers()
getQualifyingMetadata
public QualifyingMetadata getQualifyingMetadata()
isProxy
public boolean isProxy()
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotation)
getAnnotation
public <A extends Annotation> A getAnnotation(Class<A> annotation)
getAnnotations
public Annotation[] getAnnotations()
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.