org.jboss.weld.introspector.jlr
Class WeldConstructorImpl<T>

java.lang.Object
  extended by org.jboss.weld.introspector.jlr.AbstractWeldAnnotated<T,S>
      extended by org.jboss.weld.introspector.jlr.AbstractWeldMember<T,X,S>
          extended by org.jboss.weld.introspector.jlr.AbstractWeldCallable<T,T,java.lang.reflect.Constructor<T>>
              extended by org.jboss.weld.introspector.jlr.WeldConstructorImpl<T>
Type Parameters:
T -
All Implemented Interfaces:
javax.enterprise.inject.spi.Annotated, javax.enterprise.inject.spi.AnnotatedCallable<T>, javax.enterprise.inject.spi.AnnotatedConstructor<T>, javax.enterprise.inject.spi.AnnotatedMember<T>, WeldAnnotated<T,java.lang.reflect.Constructor<T>>, WeldCallable<T,T,java.lang.reflect.Constructor<T>>, WeldConstructor<T>, WeldMember<T,T,java.lang.reflect.Constructor<T>>

public class WeldConstructorImpl<T>
extends AbstractWeldCallable<T,T,java.lang.reflect.Constructor<T>>
implements WeldConstructor<T>

Represents an annotated constructor This class is immutable, and therefore threadsafe

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.weld.introspector.WeldConstructor
MAPPED_PARAMETER_ANNOTATIONS
 
Fields inherited from interface org.jboss.weld.introspector.WeldAnnotated
MAPPED_METAANNOTATIONS
 
Method Summary
 boolean equals(java.lang.Object other)
          The overridden equals operation
 java.lang.reflect.Constructor<T> getAnnotatedConstructor()
          Gets the constructor
 java.util.List<WeldParameter<?,T>> getAnnotatedWBParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets parameter abstractions with a given annotation type.
 java.lang.reflect.Constructor<T> getDelegate()
          Gets the delegate (constructor)
 java.util.List<javax.enterprise.inject.spi.AnnotatedParameter<T>> getParameters()
           
 ConstructorSignature getSignature()
           
 java.util.List<WeldParameter<?,T>> getWBParameters()
          Gets the abstracted parameters If the parameters are null, initalize them first
 int hashCode()
          The overridden hashcode Gets the hash code from the delegate
 T newInstance(java.lang.Object... parameters)
          Creates a new instance
static
<T> WeldConstructor<T>
of(javax.enterprise.inject.spi.AnnotatedConstructor<T> annotatedConstructor, WeldClass<T> declaringClass, ClassTransformer classTransformer)
           
static
<T> WeldConstructor<T>
of(java.lang.reflect.Constructor<T> constructor, WeldClass<T> declaringClass, ClassTransformer classTransformer)
           
 java.lang.String toString()
          Gets a string representation of the constructor
 
Methods inherited from class org.jboss.weld.introspector.jlr.AbstractWeldMember
getDeclaringType, getJavaMember, getName, getPackage, isFinal, isPackagePrivate, isPrivate, isPublic, isStatic, isTransient
 
Methods inherited from class org.jboss.weld.introspector.jlr.AbstractWeldAnnotated
getActualTypeArguments, getAnnotation, getAnnotations, getAnnotationStore, getBaseType, getBindingsAsArray, getDeclaredMetaAnnotations, getInterfaceOnlyFlattenedTypeHierarchy, getJavaClass, getMetaAnnotations, getMetaAnnotationsAsArray, getQualifiers, getTypeClosure, isAnnotationPresent, isDeclaredAnnotationPresent, isParameterizedType, isProxyable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.weld.introspector.WeldMember
getDeclaringType, getJavaMember
 
Methods inherited from interface org.jboss.weld.introspector.WeldAnnotated
getActualTypeArguments, getBindingsAsArray, getDeclaredMetaAnnotations, getInterfaceOnlyFlattenedTypeHierarchy, getJavaClass, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getPackage, getQualifiers, isDeclaredAnnotationPresent, isFinal, isPackagePrivate, isParameterizedType, isPrivate, isProxyable, isPublic, isStatic
 
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedConstructor
getJavaMember
 
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedMember
isStatic
 
Methods inherited from interface javax.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
 

Method Detail

of

public static <T> WeldConstructor<T> of(java.lang.reflect.Constructor<T> constructor,
                                        WeldClass<T> declaringClass,
                                        ClassTransformer classTransformer)

of

public static <T> WeldConstructor<T> of(javax.enterprise.inject.spi.AnnotatedConstructor<T> annotatedConstructor,
                                        WeldClass<T> declaringClass,
                                        ClassTransformer classTransformer)

getAnnotatedConstructor

public java.lang.reflect.Constructor<T> getAnnotatedConstructor()
Gets the constructor

Returns:
The constructor

getDelegate

public java.lang.reflect.Constructor<T> getDelegate()
Gets the delegate (constructor)

Specified by:
getDelegate in class AbstractWeldAnnotated<T,java.lang.reflect.Constructor<T>>
Returns:
The delegate

getWBParameters

public java.util.List<WeldParameter<?,T>> getWBParameters()
Gets the abstracted parameters If the parameters are null, initalize them first

Specified by:
getWBParameters in interface WeldCallable<T,T,java.lang.reflect.Constructor<T>>
Returns:
A list of annotated parameter abstractions
See Also:
WeldCallable.getWBParameters()

getAnnotatedWBParameters

public java.util.List<WeldParameter<?,T>> getAnnotatedWBParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets parameter abstractions with a given annotation type. If the parameters are null, they are initializes first.

Specified by:
getAnnotatedWBParameters in interface WeldCallable<T,T,java.lang.reflect.Constructor<T>>
Parameters:
annotationType - The annotation type to match
Returns:
A list of matching parameter abstractions. An empty list is returned if there are no matches.
See Also:
WeldCallable.getAnnotatedWBParameters(Class)

newInstance

public T newInstance(java.lang.Object... parameters)
              throws java.lang.IllegalArgumentException,
                     java.lang.InstantiationException,
                     java.lang.IllegalAccessException,
                     java.lang.reflect.InvocationTargetException
Creates a new instance

Specified by:
newInstance in interface WeldConstructor<T>
Parameters:
manager - The Bean manager
Returns:
An instance
Throws:
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.IllegalArgumentException
See Also:
org.jboss.weld.introspector.WeldConstructor#newInstance(BeanManagerImpl)

equals

public boolean equals(java.lang.Object other)
The overridden equals operation

Overrides:
equals in class AbstractWeldAnnotated<T,java.lang.reflect.Constructor<T>>
Parameters:
other - The instance to compare to
Returns:
True if equal, false otherwise

hashCode

public int hashCode()
The overridden hashcode Gets the hash code from the delegate

Overrides:
hashCode in class AbstractWeldAnnotated<T,java.lang.reflect.Constructor<T>>
Returns:
The hash code

toString

public java.lang.String toString()
Gets a string representation of the constructor

Overrides:
toString in class AbstractWeldMember<T,T,java.lang.reflect.Constructor<T>>
Returns:
A string representation

getSignature

public ConstructorSignature getSignature()
Specified by:
getSignature in interface WeldConstructor<T>

getParameters

public java.util.List<javax.enterprise.inject.spi.AnnotatedParameter<T>> getParameters()
Specified by:
getParameters in interface javax.enterprise.inject.spi.AnnotatedCallable<T>


Copyright © 2008-2009 Seam Framework. All Rights Reserved.