org.jboss.webbeans.introspector
Interface AnnotatedConstructor<T>

All Superinterfaces:
AnnotatedItem<T,java.lang.reflect.Constructor<T>>, AnnotatedMember<T,java.lang.reflect.Constructor<T>>
All Known Implementing Classes:
AnnotatedConstructorImpl, ConstructorInjectionPoint, ForwardingAnnotatedConstructor

public interface AnnotatedConstructor<T>
extends AnnotatedMember<T,java.lang.reflect.Constructor<T>>

Represents a Class Constructor

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
MAPPED_METAANNOTATIONS
 
Method Summary
 java.util.List<AnnotatedParameter<?>> getAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all parameters to the constructor which are annotated with annotationType
 AnnotatedType<T> getDeclaringClass()
          Gets the declaring class of the annotation
 java.util.List<? extends AnnotatedParameter<?>> getParameters()
          Gets all parameters to the constructor
 ConstructorSignature getSignature()
           
 T newInstance(java.lang.Object... parameters)
          Creates a new instance of the class, using this constructor
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedMember
getMember
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindings, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isParameterizedType, isProxyable, isPublic, isStatic
 

Method Detail

getParameters

java.util.List<? extends AnnotatedParameter<?>> getParameters()
Gets all parameters to the constructor

Returns:
A set of abstracted parameters. Returns an empty set if there are no parameters

getAnnotatedParameters

java.util.List<AnnotatedParameter<?>> getAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all parameters to the constructor which are annotated with annotationType

Parameters:
annotationType - A annotation to match
Returns:
A list of abstracted parameters with the given annotation type. Returns an empty set if there are no matches.

newInstance

T newInstance(java.lang.Object... parameters)
              throws java.lang.IllegalArgumentException,
                     java.lang.InstantiationException,
                     java.lang.IllegalAccessException,
                     java.lang.reflect.InvocationTargetException
Creates a new instance of the class, using this constructor

Returns:
The created instance
Throws:
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getDeclaringClass

AnnotatedType<T> getDeclaringClass()
Gets the declaring class of the annotation

Specified by:
getDeclaringClass in interface AnnotatedMember<T,java.lang.reflect.Constructor<T>>
Returns:
An abstraction of the declaring class

getSignature

ConstructorSignature getSignature()


Copyright © 2011. All Rights Reserved.