org.aspectj.internal.lang.reflect
Class AjTypeImpl<T>

java.lang.Object
  extended by org.aspectj.internal.lang.reflect.AjTypeImpl<T>
All Implemented Interfaces:
java.lang.reflect.AnnotatedElement, java.lang.reflect.Type, AjType<T>

public class AjTypeImpl<T>
extends java.lang.Object
implements AjType<T>


Constructor Summary
AjTypeImpl(java.lang.Class<T> fromClass)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Advice[] getAdvice(AdviceKind... ofType)
          Returns all of the advice for this type, of an advice kind contained in the parameter list.
 Advice getAdvice(java.lang.String name)
          Returns the advice with the given name.
 AjType<?>[] getAjTypes()
          Returns an array containing all the public types that are members of this type
<A extends java.lang.annotation.Annotation>
A
getAnnotation(java.lang.Class<A> annotationType)
           
 java.lang.annotation.Annotation[] getAnnotations()
           
 java.lang.reflect.Constructor getConstructor(AjType<?>... parameterTypes)
          Returns the constructor object for the specified public constructor of this type
 java.lang.reflect.Constructor[] getConstructors()
          Returns all of the public constructors of this type
 DeclareAnnotation[] getDeclareAnnotations()
          Return all of the declare annotation members of this type, including declare annotation members inherited from super-types
 Advice[] getDeclaredAdvice(AdviceKind... ofType)
          Returns all of the advice declared by this type, of an advice kind contained in the parameter list.
 Advice getDeclaredAdvice(java.lang.String name)
          Returns the advice declared in this type with the given name.
 AjType<?>[] getDeclaredAjTypes()
          Returns an array containing all the types declared by this type
 java.lang.annotation.Annotation[] getDeclaredAnnotations()
           
 java.lang.reflect.Constructor getDeclaredConstructor(AjType<?>... parameterTypes)
          Returns the constructor object for the specified constructor of this type
 java.lang.reflect.Constructor[] getDeclaredConstructors()
          Returns all the constructors declared in this type
 java.lang.reflect.Field getDeclaredField(java.lang.String name)
          Return the field declared in this type with the given name
 java.lang.reflect.Field[] getDeclaredFields()
          Returns all the fields declared in this type
 InterTypeConstructorDeclaration getDeclaredITDConstructor(AjType<?> target, AjType<?>... parameterTypes)
          Return the inter-type constructor declared by this type matching the given specification
 InterTypeConstructorDeclaration[] getDeclaredITDConstructors()
          Returns all of the inter-type constructors declared by this type
 InterTypeFieldDeclaration getDeclaredITDField(java.lang.String name, AjType<?> target)
          Return the inter-type field declared in this type with the given specification
 InterTypeFieldDeclaration[] getDeclaredITDFields()
          Return all of the inter-type fields declared in this type
 InterTypeMethodDeclaration getDeclaredITDMethod(java.lang.String name, AjType<?> target, AjType<?>... parameterTypes)
          Return the inter-type method declared by this type matching the given specification
 InterTypeMethodDeclaration[] getDeclaredITDMethods()
          Return all of the inter-type methods declared by this type
 java.lang.reflect.Method getDeclaredMethod(java.lang.String name, AjType<?>... parameterTypes)
          Return the method object for the specified method declared in this type
 java.lang.reflect.Method[] getDeclaredMethods()
          Return all the methods declared by this type
 Pointcut getDeclaredPointcut(java.lang.String name)
          Return the pointcut object representing the specified pointcut declared by this type
 Pointcut[] getDeclaredPointcuts()
          Returns all of the pointcuts declared by this type
 DeclareErrorOrWarning[] getDeclareErrorOrWarnings()
          Returns all of the declare error and declare warning members of this type, including declare error/warning members inherited from super-types
 DeclareParents[] getDeclareParents()
          Returns all of the declare parents members of this type, including declare parent members inherited from super-types
 DeclarePrecedence[] getDeclarePrecedence()
          Return all of the declare precedence members of this type, including declare precedence members inherited from super-types
 DeclareSoft[] getDeclareSofts()
          Return all of the declare soft members of this type, including declare soft members inherited from super-types
 AjType<?> getDeclaringType()
          If this type is a member of another type, return the AjType representing the type in which it was declared.
 java.lang.reflect.Constructor getEnclosingConstructor()
          If this type represents a local or anonymous type declared within a constructor, return then enclosing Method object.
 java.lang.reflect.Method getEnclosingMethod()
          If this type represents a local or anonymous type declared within a method, return then enclosing Method object.
 AjType<?> getEnclosingType()
          Returns the immediately enclosing type of this type.
 T[] getEnumConstants()
          Returns the elements of this enum class, or null if this type does not represent an enum type.
 java.lang.reflect.Field getField(java.lang.String name)
          Return the public field with the given name
 java.lang.reflect.Field[] getFields()
          Return the public fields declared by this type
 java.lang.reflect.Type getGenericSupertype()
          The generic supertype of this type, as defined by Class.getGenericSupertype
 AjType<?>[] getInterfaces()
          The interfaces implemented by this type
 InterTypeConstructorDeclaration getITDConstructor(AjType<?> target, AjType<?>... parameterTypes)
          Return the public inter-type constructor matching the given specification
 InterTypeConstructorDeclaration[] getITDConstructors()
          Return all of the public inter-type constructors of this type
 InterTypeFieldDeclaration getITDField(java.lang.String name, AjType<?> target)
          Return the public inter-type field matching the given specification
 InterTypeFieldDeclaration[] getITDFields()
          Return all of the public inter-type fields for this type
 InterTypeMethodDeclaration getITDMethod(java.lang.String name, AjType<?> target, AjType<?>... parameterTypes)
          Return the public inter-type method of this type matching the given specification
 InterTypeMethodDeclaration[] getITDMethods()
          Return all of the public inter-type declared methods of this type
 java.lang.Class<T> getJavaClass()
          The java.lang.Class that corresponds to this AjType
 java.lang.reflect.Method getMethod(java.lang.String name, AjType<?>... parameterTypes)
          Return the method object for the specified public method declared in this type
 java.lang.reflect.Method[] getMethods()
          Returns all the public methods of this type
 int getModifiers()
          The modifiers declared for this type.
 java.lang.String getName()
          The name of this type, in the same format as returned by Class.getName()
 java.lang.Package getPackage()
          The package in which this type is declared
 PerClause getPerClause()
          If this type represents an aspect, returns the associated per-clause.
 Pointcut getPointcut(java.lang.String name)
          Return the pointcut object representing the specified public pointcut
 Pointcut[] getPointcuts()
          Returns all of the public pointcuts of this type
 AjType<? super T> getSupertype()
          The supertype of this type.
 java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters()
          Returns an array of TypeVariable objects that represent the type variables declared by this type (if any)
 int hashCode()
           
 boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
           
 boolean isArray()
          Return true if this is an array type
 boolean isAspect()
          Return true if this is an aspect type
 boolean isEnum()
          True if this is an enum type
 boolean isInstance(java.lang.Object o)
          True if the given object is assignment-compatible with an object of the type represented by this AjType
 boolean isInterface()
          True if this is an interface type
 boolean isLocalClass()
          Returns true if and only if the underlying type is a local class
 boolean isMemberAspect()
          Returns true if and only if the underlying type is a member aspect
 boolean isMemberClass()
          Returns true if and only if the underlying type is a member class
 boolean isPrimitive()
          Return true if this object represents a primitive type
 boolean isPrivileged()
          Returns true if and only if the underlying type is a privileged aspect
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjTypeImpl

public AjTypeImpl(java.lang.Class<T> fromClass)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: AjType
The name of this type, in the same format as returned by Class.getName()

Specified by:
getName in interface AjType<T>

getPackage

public java.lang.Package getPackage()
Description copied from interface: AjType
The package in which this type is declared

Specified by:
getPackage in interface AjType<T>

getInterfaces

public AjType<?>[] getInterfaces()
Description copied from interface: AjType
The interfaces implemented by this type

Specified by:
getInterfaces in interface AjType<T>

getModifiers

public int getModifiers()
Description copied from interface: AjType
The modifiers declared for this type. The return value can be interpreted using java.lang.reflect.Modifier

Specified by:
getModifiers in interface AjType<T>

getJavaClass

public java.lang.Class<T> getJavaClass()
Description copied from interface: AjType
The java.lang.Class that corresponds to this AjType

Specified by:
getJavaClass in interface AjType<T>

getSupertype

public AjType<? super T> getSupertype()
Description copied from interface: AjType
The supertype of this type. If this type represents Object or a primitive type then null is returned.

Specified by:
getSupertype in interface AjType<T>

getGenericSupertype

public java.lang.reflect.Type getGenericSupertype()
Description copied from interface: AjType
The generic supertype of this type, as defined by Class.getGenericSupertype

Specified by:
getGenericSupertype in interface AjType<T>

getEnclosingMethod

public java.lang.reflect.Method getEnclosingMethod()
Description copied from interface: AjType
If this type represents a local or anonymous type declared within a method, return then enclosing Method object.

Specified by:
getEnclosingMethod in interface AjType<T>

getEnclosingConstructor

public java.lang.reflect.Constructor getEnclosingConstructor()
Description copied from interface: AjType
If this type represents a local or anonymous type declared within a constructor, return then enclosing Method object.

Specified by:
getEnclosingConstructor in interface AjType<T>

getEnclosingType

public AjType<?> getEnclosingType()
Description copied from interface: AjType
Returns the immediately enclosing type of this type.

Specified by:
getEnclosingType in interface AjType<T>

getDeclaringType

public AjType<?> getDeclaringType()
Description copied from interface: AjType
If this type is a member of another type, return the AjType representing the type in which it was declared.

Specified by:
getDeclaringType in interface AjType<T>

getPerClause

public PerClause getPerClause()
Description copied from interface: AjType
If this type represents an aspect, returns the associated per-clause. Returns null for non-aspect types.

Specified by:
getPerClause in interface AjType<T>

isAnnotationPresent

public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Specified by:
isAnnotationPresent in interface java.lang.reflect.AnnotatedElement

getAnnotation

public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
Specified by:
getAnnotation in interface java.lang.reflect.AnnotatedElement

getAnnotations

public java.lang.annotation.Annotation[] getAnnotations()
Specified by:
getAnnotations in interface java.lang.reflect.AnnotatedElement

getDeclaredAnnotations

public java.lang.annotation.Annotation[] getDeclaredAnnotations()
Specified by:
getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElement

getAjTypes

public AjType<?>[] getAjTypes()
Description copied from interface: AjType
Returns an array containing all the public types that are members of this type

Specified by:
getAjTypes in interface AjType<T>

getDeclaredAjTypes

public AjType<?>[] getDeclaredAjTypes()
Description copied from interface: AjType
Returns an array containing all the types declared by this type

Specified by:
getDeclaredAjTypes in interface AjType<T>

getConstructor

public java.lang.reflect.Constructor getConstructor(AjType<?>... parameterTypes)
                                             throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Returns the constructor object for the specified public constructor of this type

Specified by:
getConstructor in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getConstructors

public java.lang.reflect.Constructor[] getConstructors()
Description copied from interface: AjType
Returns all of the public constructors of this type

Specified by:
getConstructors in interface AjType<T>

getDeclaredConstructor

public java.lang.reflect.Constructor getDeclaredConstructor(AjType<?>... parameterTypes)
                                                     throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Returns the constructor object for the specified constructor of this type

Specified by:
getDeclaredConstructor in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getDeclaredConstructors

public java.lang.reflect.Constructor[] getDeclaredConstructors()
Description copied from interface: AjType
Returns all the constructors declared in this type

Specified by:
getDeclaredConstructors in interface AjType<T>

getDeclaredField

public java.lang.reflect.Field getDeclaredField(java.lang.String name)
                                         throws java.lang.NoSuchFieldException
Description copied from interface: AjType
Return the field declared in this type with the given name

Specified by:
getDeclaredField in interface AjType<T>
Throws:
java.lang.NoSuchFieldException

getDeclaredFields

public java.lang.reflect.Field[] getDeclaredFields()
Description copied from interface: AjType
Returns all the fields declared in this type

Specified by:
getDeclaredFields in interface AjType<T>

getField

public java.lang.reflect.Field getField(java.lang.String name)
                                 throws java.lang.NoSuchFieldException
Description copied from interface: AjType
Return the public field with the given name

Specified by:
getField in interface AjType<T>
Throws:
java.lang.NoSuchFieldException

getFields

public java.lang.reflect.Field[] getFields()
Description copied from interface: AjType
Return the public fields declared by this type

Specified by:
getFields in interface AjType<T>

getDeclaredMethod

public java.lang.reflect.Method getDeclaredMethod(java.lang.String name,
                                                  AjType<?>... parameterTypes)
                                           throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Return the method object for the specified method declared in this type

Specified by:
getDeclaredMethod in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getMethod

public java.lang.reflect.Method getMethod(java.lang.String name,
                                          AjType<?>... parameterTypes)
                                   throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Return the method object for the specified public method declared in this type

Specified by:
getMethod in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getDeclaredMethods

public java.lang.reflect.Method[] getDeclaredMethods()
Description copied from interface: AjType
Return all the methods declared by this type

Specified by:
getDeclaredMethods in interface AjType<T>

getMethods

public java.lang.reflect.Method[] getMethods()
Description copied from interface: AjType
Returns all the public methods of this type

Specified by:
getMethods in interface AjType<T>

getDeclaredPointcut

public Pointcut getDeclaredPointcut(java.lang.String name)
                             throws NoSuchPointcutException
Description copied from interface: AjType
Return the pointcut object representing the specified pointcut declared by this type

Specified by:
getDeclaredPointcut in interface AjType<T>
Throws:
NoSuchPointcutException

getPointcut

public Pointcut getPointcut(java.lang.String name)
                     throws NoSuchPointcutException
Description copied from interface: AjType
Return the pointcut object representing the specified public pointcut

Specified by:
getPointcut in interface AjType<T>
Throws:
NoSuchPointcutException

getDeclaredPointcuts

public Pointcut[] getDeclaredPointcuts()
Description copied from interface: AjType
Returns all of the pointcuts declared by this type

Specified by:
getDeclaredPointcuts in interface AjType<T>

getPointcuts

public Pointcut[] getPointcuts()
Description copied from interface: AjType
Returns all of the public pointcuts of this type

Specified by:
getPointcuts in interface AjType<T>

getDeclaredAdvice

public Advice[] getDeclaredAdvice(AdviceKind... ofType)
Description copied from interface: AjType
Returns all of the advice declared by this type, of an advice kind contained in the parameter list.

Specified by:
getDeclaredAdvice in interface AjType<T>

getAdvice

public Advice[] getAdvice(AdviceKind... ofType)
Description copied from interface: AjType
Returns all of the advice for this type, of an advice kind contained in the parameter list.

Specified by:
getAdvice in interface AjType<T>

getAdvice

public Advice getAdvice(java.lang.String name)
                 throws NoSuchAdviceException
Description copied from interface: AjType
Returns the advice with the given name. For an @AspectJ declared advice member, this is the name of the annotated method. For a code-style advice declaration, this is the name given in the @AdviceName annotation if present.

Specified by:
getAdvice in interface AjType<T>
Throws:
NoSuchAdviceException

getDeclaredAdvice

public Advice getDeclaredAdvice(java.lang.String name)
                         throws NoSuchAdviceException
Description copied from interface: AjType
Returns the advice declared in this type with the given name. For an @AspectJ declared advice member, this is the name of the annotated method. For a code-style advice declaration, this is the name given in the @AdviceName annotation if present.

Specified by:
getDeclaredAdvice in interface AjType<T>
Throws:
NoSuchAdviceException

getDeclaredITDMethod

public InterTypeMethodDeclaration getDeclaredITDMethod(java.lang.String name,
                                                       AjType<?> target,
                                                       AjType<?>... parameterTypes)
                                                throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Return the inter-type method declared by this type matching the given specification

Specified by:
getDeclaredITDMethod in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getDeclaredITDMethods

public InterTypeMethodDeclaration[] getDeclaredITDMethods()
Description copied from interface: AjType
Return all of the inter-type methods declared by this type

Specified by:
getDeclaredITDMethods in interface AjType<T>

getITDMethod

public InterTypeMethodDeclaration getITDMethod(java.lang.String name,
                                               AjType<?> target,
                                               AjType<?>... parameterTypes)
                                        throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Return the public inter-type method of this type matching the given specification

Specified by:
getITDMethod in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getITDMethods

public InterTypeMethodDeclaration[] getITDMethods()
Description copied from interface: AjType
Return all of the public inter-type declared methods of this type

Specified by:
getITDMethods in interface AjType<T>

getDeclaredITDConstructor

public InterTypeConstructorDeclaration getDeclaredITDConstructor(AjType<?> target,
                                                                 AjType<?>... parameterTypes)
                                                          throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Return the inter-type constructor declared by this type matching the given specification

Specified by:
getDeclaredITDConstructor in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getDeclaredITDConstructors

public InterTypeConstructorDeclaration[] getDeclaredITDConstructors()
Description copied from interface: AjType
Returns all of the inter-type constructors declared by this type

Specified by:
getDeclaredITDConstructors in interface AjType<T>

getITDConstructor

public InterTypeConstructorDeclaration getITDConstructor(AjType<?> target,
                                                         AjType<?>... parameterTypes)
                                                  throws java.lang.NoSuchMethodException
Description copied from interface: AjType
Return the public inter-type constructor matching the given specification

Specified by:
getITDConstructor in interface AjType<T>
Throws:
java.lang.NoSuchMethodException

getITDConstructors

public InterTypeConstructorDeclaration[] getITDConstructors()
Description copied from interface: AjType
Return all of the public inter-type constructors of this type

Specified by:
getITDConstructors in interface AjType<T>

getDeclaredITDField

public InterTypeFieldDeclaration getDeclaredITDField(java.lang.String name,
                                                     AjType<?> target)
                                              throws java.lang.NoSuchFieldException
Description copied from interface: AjType
Return the inter-type field declared in this type with the given specification

Specified by:
getDeclaredITDField in interface AjType<T>
Throws:
java.lang.NoSuchFieldException

getDeclaredITDFields

public InterTypeFieldDeclaration[] getDeclaredITDFields()
Description copied from interface: AjType
Return all of the inter-type fields declared in this type

Specified by:
getDeclaredITDFields in interface AjType<T>

getITDField

public InterTypeFieldDeclaration getITDField(java.lang.String name,
                                             AjType<?> target)
                                      throws java.lang.NoSuchFieldException
Description copied from interface: AjType
Return the public inter-type field matching the given specification

Specified by:
getITDField in interface AjType<T>
Throws:
java.lang.NoSuchFieldException

getITDFields

public InterTypeFieldDeclaration[] getITDFields()
Description copied from interface: AjType
Return all of the public inter-type fields for this type

Specified by:
getITDFields in interface AjType<T>

getDeclareErrorOrWarnings

public DeclareErrorOrWarning[] getDeclareErrorOrWarnings()
Description copied from interface: AjType
Returns all of the declare error and declare warning members of this type, including declare error/warning members inherited from super-types

Specified by:
getDeclareErrorOrWarnings in interface AjType<T>

getDeclareParents

public DeclareParents[] getDeclareParents()
Description copied from interface: AjType
Returns all of the declare parents members of this type, including declare parent members inherited from super-types

Specified by:
getDeclareParents in interface AjType<T>

getDeclareSofts

public DeclareSoft[] getDeclareSofts()
Description copied from interface: AjType
Return all of the declare soft members of this type, including declare soft members inherited from super-types

Specified by:
getDeclareSofts in interface AjType<T>

getDeclareAnnotations

public DeclareAnnotation[] getDeclareAnnotations()
Description copied from interface: AjType
Return all of the declare annotation members of this type, including declare annotation members inherited from super-types

Specified by:
getDeclareAnnotations in interface AjType<T>

getDeclarePrecedence

public DeclarePrecedence[] getDeclarePrecedence()
Description copied from interface: AjType
Return all of the declare precedence members of this type, including declare precedence members inherited from super-types

Specified by:
getDeclarePrecedence in interface AjType<T>

getEnumConstants

public T[] getEnumConstants()
Description copied from interface: AjType
Returns the elements of this enum class, or null if this type does not represent an enum type.

Specified by:
getEnumConstants in interface AjType<T>

getTypeParameters

public java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters()
Description copied from interface: AjType
Returns an array of TypeVariable objects that represent the type variables declared by this type (if any)

Specified by:
getTypeParameters in interface AjType<T>

isEnum

public boolean isEnum()
Description copied from interface: AjType
True if this is an enum type

Specified by:
isEnum in interface AjType<T>

isInstance

public boolean isInstance(java.lang.Object o)
Description copied from interface: AjType
True if the given object is assignment-compatible with an object of the type represented by this AjType

Specified by:
isInstance in interface AjType<T>

isInterface

public boolean isInterface()
Description copied from interface: AjType
True if this is an interface type

Specified by:
isInterface in interface AjType<T>

isLocalClass

public boolean isLocalClass()
Description copied from interface: AjType
Returns true if and only if the underlying type is a local class

Specified by:
isLocalClass in interface AjType<T>

isMemberClass

public boolean isMemberClass()
Description copied from interface: AjType
Returns true if and only if the underlying type is a member class

Specified by:
isMemberClass in interface AjType<T>

isArray

public boolean isArray()
Description copied from interface: AjType
Return true if this is an array type

Specified by:
isArray in interface AjType<T>

isPrimitive

public boolean isPrimitive()
Description copied from interface: AjType
Return true if this object represents a primitive type

Specified by:
isPrimitive in interface AjType<T>

isAspect

public boolean isAspect()
Description copied from interface: AjType
Return true if this is an aspect type

Specified by:
isAspect in interface AjType<T>

isMemberAspect

public boolean isMemberAspect()
Description copied from interface: AjType
Returns true if and only if the underlying type is a member aspect

Specified by:
isMemberAspect in interface AjType<T>

isPrivileged

public boolean isPrivileged()
Description copied from interface: AjType
Returns true if and only if the underlying type is a privileged aspect

Specified by:
isPrivileged in interface AjType<T>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object