org.apache.webbeans.portable
Class AnnotatedElementFactory

java.lang.Object
  extended by org.apache.webbeans.portable.AnnotatedElementFactory

public final class AnnotatedElementFactory
extends Object

Factory for Annotated elements.

Version:
$Rev: 1305134 $ $Date: 2012-03-25 23:06:25 +0200 (So, 25 Mär 2012) $

Constructor Summary
AnnotatedElementFactory(WebBeansContext webBeansContext)
          No instantiate.
 
Method Summary
 void clear()
          Clear caches.
<X> javax.enterprise.inject.spi.AnnotatedType<X>
getAnnotatedType(Class<X> annotatedClass)
          Get an already registered AnnotatedType.
static AnnotatedElementFactory getInstance()
          Deprecated. 
<X> javax.enterprise.inject.spi.AnnotatedConstructor<X>
newAnnotatedConstructor(Constructor<X> constructor, javax.enterprise.inject.spi.AnnotatedType<X> declaringClass)
          Creates and configures new annotated constructor.
<X> javax.enterprise.inject.spi.AnnotatedField<X>
newAnnotatedField(Field field, javax.enterprise.inject.spi.AnnotatedType<X> declaringClass)
          Creates and configures new annotated field.
<X> javax.enterprise.inject.spi.AnnotatedMethod<X>
newAnnotatedMethod(Method method, javax.enterprise.inject.spi.AnnotatedType<X> declaringType)
          Creates and configures new annotated method.
<X> javax.enterprise.inject.spi.AnnotatedType<X>
newAnnotatedType(Class<X> annotatedClass)
          Creates and configures new annotated type.
<X> javax.enterprise.inject.spi.AnnotatedType<X>
setAnnotatedType(javax.enterprise.inject.spi.AnnotatedType<X> annotatedType)
          This method will get used to manually add AnnoatedTypes to our storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedElementFactory

public AnnotatedElementFactory(WebBeansContext webBeansContext)
No instantiate.

Method Detail

getInstance

@Deprecated
public static AnnotatedElementFactory getInstance()
Deprecated. 


getAnnotatedType

public <X> javax.enterprise.inject.spi.AnnotatedType<X> getAnnotatedType(Class<X> annotatedClass)
Get an already registered AnnotatedType. This will NOT create a new one!

Type Parameters:
X -
Parameters:
annotatedClass -
Returns:
AnnotatedType

setAnnotatedType

public <X> javax.enterprise.inject.spi.AnnotatedType<X> setAnnotatedType(javax.enterprise.inject.spi.AnnotatedType<X> annotatedType)
This method will get used to manually add AnnoatedTypes to our storage. Those AnnotatedTypes are coming from Extensions and get registered e.g. via BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) Sets the annotatedType and replace the given one.

Type Parameters:
X -
Parameters:
annotatedType -
Returns:
the previously registered AnnotatedType or null if not previously defined.

newAnnotatedType

public <X> javax.enterprise.inject.spi.AnnotatedType<X> newAnnotatedType(Class<X> annotatedClass)
Creates and configures new annotated type.

Type Parameters:
X - class info
Parameters:
annotatedClass - annotated class
Returns:
new annotated type

newAnnotatedConstructor

public <X> javax.enterprise.inject.spi.AnnotatedConstructor<X> newAnnotatedConstructor(Constructor<X> constructor,
                                                                                       javax.enterprise.inject.spi.AnnotatedType<X> declaringClass)
Creates and configures new annotated constructor.

Type Parameters:
X - declaring class
Parameters:
constructor - constructor
Returns:
new annotated constructor

newAnnotatedField

public <X> javax.enterprise.inject.spi.AnnotatedField<X> newAnnotatedField(Field field,
                                                                           javax.enterprise.inject.spi.AnnotatedType<X> declaringClass)
Creates and configures new annotated field.

Type Parameters:
X - declaring class
Parameters:
field - field instance
declaringClass - declaring class
Returns:
new annotated field

newAnnotatedMethod

public <X> javax.enterprise.inject.spi.AnnotatedMethod<X> newAnnotatedMethod(Method method,
                                                                             javax.enterprise.inject.spi.AnnotatedType<X> declaringType)
Creates and configures new annotated method.

Type Parameters:
X - declaring class
Parameters:
method - annotated method
declaringType - declaring class info
Returns:
new annotated method

clear

public void clear()
Clear caches.



Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.