Errai 3.0.1-SNAPSHOT

org.jboss.errai.ioc.rebind.ioc.injector.api
Class InjectionPoint<T>

java.lang.Object
  extended by org.jboss.errai.ioc.rebind.ioc.injector.api.InjectionPoint<T>
Direct Known Subclasses:
InjectableInstance

public class InjectionPoint<T>
extends Object

Author:
Mike Brock

Field Summary
protected  T annotation
           
protected  MetaConstructor constructor
           
protected  MetaField field
           
protected  InjectionContext injectionContext
           
protected  Injector injector
           
protected  MetaMethod method
           
protected  MetaParameter parm
           
protected  TaskType taskType
           
protected  MetaClass type
           
 
Constructor Summary
InjectionPoint(T annotation, TaskType taskType, MetaConstructor constructor, MetaMethod method, MetaField field, MetaClass type, MetaParameter parm, Injector injector, InjectionContext injectionContext)
           
 
Method Summary
 void ensureMemberExposed()
           
 void ensureMemberExposed(PrivateAccessType accessType)
           
 T getAnnotation()
           
<A extends Annotation>
A
getAnnotation(Class<A> annotation)
           
 Annotation[] getAnnotations()
           
 MetaConstructor getConstructor()
           
 MetaClass getElementType()
           
 MetaClass getElementTypeOrMethodReturnType()
          Returns the element type or a method return type, based on what the injection point is.
 MetaClass getEnclosingType()
           
 MetaField getField()
           
 InjectionContext getInjectionContext()
           
 Injector getInjector()
          Returns the Injector reference for the the bean
 String getMemberName()
           
 MetaMethod getMethod()
           
 MetaParameter getParm()
          Returns the parameter reference if the injection point is a parameter, otherwise returns null.
 Annotation[] getQualifiers()
           
 QualifyingMetadata getQualifyingMetadata()
           
 Annotation getRawAnnotation()
           
 TaskType getTaskType()
           
 boolean isAnnotationPresent(Class<? extends Annotation> annotation)
           
 boolean isProxy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

InjectionPoint

public InjectionPoint(T annotation,
                      TaskType taskType,
                      MetaConstructor constructor,
                      MetaMethod method,
                      MetaField field,
                      MetaClass type,
                      MetaParameter parm,
                      Injector injector,
                      InjectionContext injectionContext)
Method Detail

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()

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.