Package org.aspectj.lang.reflect
Schnittstelle AjType<T>
- Alle Superschnittstellen:
AnnotatedElement
,Type
- Alle bekannten Implementierungsklassen:
AjTypeImpl
The runtime representation of a type (Aspect, Class, Interface, Annotation, Enum, or Array) in an AspectJ
program.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungFor an annotation style advice member, this is the name of the annotated method.Advice[]
getAdvice
(AdviceKind... ofTypes) AjType<?>[]
getConstructor
(AjType<?>... parameterTypes) getDeclaredAdvice
(String name) For an annotation style advice member, this is the name of the annotated method.Advice[]
getDeclaredAdvice
(AdviceKind... ofTypes) AjType<?>[]
getDeclaredConstructor
(AjType<?>... parameterTypes) getDeclaredField
(String name) Field[]
getDeclaredITDConstructor
(AjType<?> target, AjType<?>... parameterTypes) getDeclaredITDField
(String name, AjType<?> target) getDeclaredITDMethod
(String name, AjType<?> target, AjType<?>... parameterTypes) getDeclaredMethod
(String name, AjType<?>... parameterTypes) Method[]
getDeclaredPointcut
(String name) Pointcut[]
AjType<?>
AjType<?>
T[]
Field[]
AjType<?>[]
getITDConstructor
(AjType<?> target, AjType<?>... parameterTypes) getITDField
(String name, AjType<?> target) getITDMethod
(String name, AjType<?> target, AjType<?>... parameterTypes) Method[]
int
getName()
getPointcut
(String name) Pointcut[]
AjType<?>
TypeVariable<Class<T>>[]
boolean
isArray()
boolean
isAspect()
boolean
isEnum()
boolean
isInstance
(Object o) boolean
boolean
boolean
boolean
boolean
boolean
Von Schnittstelle geerbte Methoden java.lang.reflect.AnnotatedElement
getAnnotation, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAnnotationPresent
Von Schnittstelle geerbte Methoden java.lang.reflect.Type
getTypeName
-
Methodendetails
-
getName
String getName()- Gibt zurück:
- the name of this type, in the same format as returned by Class.getName()
-
getPackage
Package getPackage()- Gibt zurück:
- the package in which this type is declared
-
getInterfaces
AjType<?>[] getInterfaces()- Gibt zurück:
- the interfaces implemented by this type
-
getModifiers
int getModifiers()- Gibt zurück:
- the modifiers declared for this type. The return value can be interpreted using java.lang.reflect.Modifier
-
getJavaClass
- Gibt zurück:
- the java.lang.Class that corresponds to this AjType
-
getSupertype
AjType<?> getSupertype()- Gibt zurück:
- the supertype of this type. If this type represents Object or a primitive type then null is returned.
-
getGenericSupertype
Type getGenericSupertype()- Gibt zurück:
- the generic supertype of this type, as defined by Class.getGenericSupertype
-
getEnclosingMethod
Method getEnclosingMethod()- Gibt zurück:
- the enclosing Method if this type represents a local or anonymous type declared within a method
-
getEnclosingConstructor
Constructor getEnclosingConstructor()- Gibt zurück:
- the enclosing Method if this type represents a local or anonymous type declared within a constructor
-
getEnclosingType
AjType<?> getEnclosingType()- Gibt zurück:
- the immediately enclosing type of this type.
-
getDeclaringType
AjType<?> getDeclaringType()- Gibt zurück:
- the AjType representing the typei n which it was declared (if this type is a member of another type)
-
getPerClause
PerClause getPerClause()- Gibt zurück:
- the per-clause if this is an aspect, otherwise null
-
getAjTypes
AjType<?>[] getAjTypes()- Gibt zurück:
- an array containing all the public types that are members of this type
-
getDeclaredAjTypes
AjType<?>[] getDeclaredAjTypes()- Gibt zurück:
- an array containing all the types declared by this type
-
getConstructor
- Parameter:
parameterTypes
- the types of the constructor parameters- Gibt zurück:
- the constructor object for the specified public constructor of this type
- Löst aus:
NoSuchMethodException
- if constructor not found
-
getConstructors
Constructor[] getConstructors()- Gibt zurück:
- all of the public constructors of this type
-
getDeclaredConstructor
- Parameter:
parameterTypes
- the types of the constructor parameters- Gibt zurück:
- the constructor object for the specified constructor of this type
- Löst aus:
NoSuchMethodException
- if constructor not found
-
getDeclaredConstructors
Constructor[] getDeclaredConstructors()- Gibt zurück:
- all the constructors declared in this type
-
getDeclaredField
- Parameter:
name
- the field name- Gibt zurück:
- the declared field
- Löst aus:
NoSuchFieldException
- if no field of that name is found
-
getDeclaredFields
Field[] getDeclaredFields()- Gibt zurück:
- all the fields declared in this type
-
getField
- Parameter:
name
- the field name- Gibt zurück:
- the public field with the given name
- Löst aus:
NoSuchFieldException
- if field not found
-
getFields
Field[] getFields()- Gibt zurück:
- the public fields declared by this type
-
getDeclaredMethod
- Parameter:
name
- the method nameparameterTypes
- the types of the method parameters- Gibt zurück:
- the method object for the specified method declared in this type
- Löst aus:
NoSuchMethodException
- if the method cannot be found
-
getMethod
- Parameter:
name
- the method nameparameterTypes
- the types of the method parameters- Gibt zurück:
- the method object for the specified public method declared in this type
- Löst aus:
NoSuchMethodException
- if the method cannot be found
-
getDeclaredMethods
Method[] getDeclaredMethods()- Gibt zurück:
- all the methods declared by this type
-
getMethods
Method[] getMethods()- Gibt zurück:
- all the public methods of this type
-
getDeclaredPointcut
- Parameter:
name
- the pointcut name- Gibt zurück:
- the pointcut object representing the specified pointcut declared by this type
- Löst aus:
NoSuchPointcutException
- if no pointcut of that name can be found
-
getPointcut
- Parameter:
name
- the pointcut name- Gibt zurück:
- the pointcut object representing the specified public pointcut
- Löst aus:
NoSuchPointcutException
- if no pointcut of that name can be found
-
getDeclaredPointcuts
Pointcut[] getDeclaredPointcuts()- Gibt zurück:
- all of the pointcuts declared by this type
-
getPointcuts
Pointcut[] getPointcuts()- Gibt zurück:
- all of the public pointcuts of this type
-
getDeclaredAdvice
- Parameter:
ofTypes
- theAdviceKind
s of interest- Gibt zurück:
- all of the advice declared by this type, of an advice kind contained in the parameter list.
-
getAdvice
- Parameter:
ofTypes
- theAdviceKind
s of interest- Gibt zurück:
- all of the advice for this type, of an advice kind contained in the parameter list.
-
getAdvice
For an annotation style 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.- Parameter:
name
- the advice name- Gibt zurück:
- the advice with the given name.
- Löst aus:
NoSuchAdviceException
- if no advice can be found with that name
-
getDeclaredAdvice
For an annotation style 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.- Parameter:
name
- the advice name- Gibt zurück:
- the advice declared in this type with the given name.
- Löst aus:
NoSuchAdviceException
- if no advice can be found with that name
-
getDeclaredITDMethod
InterTypeMethodDeclaration getDeclaredITDMethod(String name, AjType<?> target, AjType<?>... parameterTypes) throws NoSuchMethodException - Parameter:
name
- the method nametarget
- the target of the inter-type declarationparameterTypes
- the types of the inter-type method declaration- Gibt zurück:
- the inter-type method declared by this type matching the given specification
- Löst aus:
NoSuchMethodException
- if the inter-type declaration cannot be found
-
getDeclaredITDMethods
InterTypeMethodDeclaration[] getDeclaredITDMethods()- Gibt zurück:
- all of the inter-type methods declared by this type
-
getITDMethod
InterTypeMethodDeclaration getITDMethod(String name, AjType<?> target, AjType<?>... parameterTypes) throws NoSuchMethodException - Parameter:
name
- the method nametarget
- the target of the inter-type declarationparameterTypes
- the types of the inter-type method declaration- Gibt zurück:
- the public inter-type method of this type matching the given specification
- Löst aus:
NoSuchMethodException
- if the inter-type declaration cannot be found
-
getITDMethods
InterTypeMethodDeclaration[] getITDMethods()- Gibt zurück:
- all of the public inter-type declared methods of this type
-
getDeclaredITDConstructor
InterTypeConstructorDeclaration getDeclaredITDConstructor(AjType<?> target, AjType<?>... parameterTypes) throws NoSuchMethodException - Parameter:
target
- the target of the inter-type constructor of interestparameterTypes
- the types of the parameter of the inter-type constructor of interest- Gibt zurück:
- the inter-type constructor declared by this type matching the given specification
- Löst aus:
NoSuchMethodException
- if the inter-type declaration cannot be found
-
getDeclaredITDConstructors
InterTypeConstructorDeclaration[] getDeclaredITDConstructors()- Gibt zurück:
- all of the inter-type constructors declared by this type
-
getITDConstructor
InterTypeConstructorDeclaration getITDConstructor(AjType<?> target, AjType<?>... parameterTypes) throws NoSuchMethodException - Parameter:
target
- the target of the inter-type constructor of interestparameterTypes
- the types of the parameter of the inter-type constructor of interest- Gibt zurück:
- the public inter-type constructor matching the given specification
- Löst aus:
NoSuchMethodException
- if the inter-type declaration cannot be found
-
getITDConstructors
InterTypeConstructorDeclaration[] getITDConstructors()- Gibt zurück:
- all of the public inter-type constructors of this type
-
getDeclaredITDField
InterTypeFieldDeclaration getDeclaredITDField(String name, AjType<?> target) throws NoSuchFieldException - Parameter:
name
- the field nametarget
- the target type for the inter-type declaration- Gibt zurück:
- the inter-type field declared in this type with the given specification
- Löst aus:
NoSuchFieldException
- if the inter-type declaration cannot be found
-
getDeclaredITDFields
InterTypeFieldDeclaration[] getDeclaredITDFields()- Gibt zurück:
- all of the inter-type fields declared in this type
-
getITDField
- Parameter:
name
- the field nametarget
- the target type for the inter-type declaration- Gibt zurück:
- the public inter-type field matching the given specification
- Löst aus:
NoSuchFieldException
- if the inter-type declaration cannot be found
-
getITDFields
InterTypeFieldDeclaration[] getITDFields()- Gibt zurück:
- all of the public inter-type fields for this type
-
getDeclareErrorOrWarnings
DeclareErrorOrWarning[] getDeclareErrorOrWarnings()- Gibt zurück:
- all of the declare error and declare warning members of this type, including declare error/warning members inherited from super-types
-
getDeclareParents
DeclareParents[] getDeclareParents()- Gibt zurück:
- all of the declare parents members of this type, including declare parent members inherited from super-types
-
getDeclareSofts
DeclareSoft[] getDeclareSofts()- Gibt zurück:
- all of the declare soft members of this type, including declare soft members inherited from super-types
-
getDeclareAnnotations
DeclareAnnotation[] getDeclareAnnotations()- Gibt zurück:
- all of the declare annotation members of this type, including declare annotation members inherited from super-types
-
getDeclarePrecedence
DeclarePrecedence[] getDeclarePrecedence()- Gibt zurück:
- all of the declare precedence members of this type, including declare precedence members inherited from super-types
-
getEnumConstants
T[] getEnumConstants()- Gibt zurück:
- the elements of this enum class, or null if this type does not represent an enum type.
-
getTypeParameters
TypeVariable<Class<T>>[] getTypeParameters()- Gibt zurück:
- an array of TypeVariable objects that represent the type variables declared by this type (if any)
-
isEnum
boolean isEnum()- Gibt zurück:
- true if this is an enum type
-
isInstance
- Parameter:
o
- the object to check for assignment compatibility- Gibt zurück:
- true if the given object is assignment-compatible with an object of the type represented by this AjType
-
isInterface
boolean isInterface()- Gibt zurück:
- true if this is an interface type
-
isLocalClass
boolean isLocalClass()- Gibt zurück:
- true if and only if the underlying type is a local class
-
isMemberClass
boolean isMemberClass()- Gibt zurück:
- true if and only if the underlying type is a member class
-
isArray
boolean isArray()- Gibt zurück:
- true if this is an array type
-
isPrimitive
boolean isPrimitive()- Gibt zurück:
- true if this object represents a primitive type
-
isAspect
boolean isAspect()- Gibt zurück:
- true if this is an aspect type
-
isMemberAspect
boolean isMemberAspect()- Gibt zurück:
- true if and only if the underlying type is a member aspect
-
isPrivileged
boolean isPrivileged()- Gibt zurück:
- true if and only if the underlying type is a privileged aspect
-