Class ArrayReferenceType
java.lang.Object
org.aspectj.weaver.UnresolvedType
org.aspectj.weaver.ResolvedType
org.aspectj.weaver.ReferenceType
org.aspectj.weaver.ArrayReferenceType
- All Implemented Interfaces:
AnnotatedElement, Traceable, TypeVariableDeclaringElement
Represents a resolved array type
- Author:
- Andy Clement
-
Nested Class Summary
Nested classes/interfaces inherited from class UnresolvedType
UnresolvedType.TypeKind -
Field Summary
Fields inherited from class ReferenceType
EMPTY_ARRAYFields inherited from class ResolvedType
bits, crosscuttingMembers, EMPTY_RESOLVED_TYPE_ARRAY, interTypeMungers, MISSING, NONE, PARAMETERIZED_TYPE_IDENTIFIER, temporaryAnnotationTypes, validBoxing, worldModifier and TypeFieldDescriptionprotected intstatic final ResolvedType[]protected List<ConcreteTypeMunger> static final org.aspectj.weaver.ResolvedType.Missingstatic final ResolvedType[]static final Stringprotected WorldFields inherited from class UnresolvedType
AJC_PRIVILEGED, ANNOTATION, ARRAY_WITH_JUST_OBJECT, AT_INHERITED, AT_RETENTION, AT_TARGET, BOOLEAN, BYTE, CHAR, CLONEABLE, DOUBLE, ENUM, ERROR, FLOAT, INT, JAVA_LANG_ANNOTATION, JAVA_LANG_CLASS_ARRAY, JAVA_LANG_REFLECT_CONSTRUCTOR, JAVA_LANG_REFLECT_FIELD, JAVA_LANG_REFLECT_METHOD, JL_CLASS, JL_EXCEPTION, JL_STRING, JOINPOINT_ENCLOSINGSTATICPART, JOINPOINT_STATICPART, LONG, MISSING_NAME, OBJECT, OBJECTARRAY, PROCEEDING_JOINPOINT, RUNTIME_EXCEPTION, SERIALIZABLE, SHORT, signature, signatureErasure, SOMETHING, SUPPRESS_AJ_WARNINGS, THROWABLE, typeKind, typeParameters, typeVariables, VOIDModifier and TypeFieldDescriptionstatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedType[]static final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final Stringstatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypeprotected Stringprotected StringThe erasure of the signature.static final UnresolvedTypestatic final UnresolvedTypestatic final UnresolvedTypeprotected UnresolvedType.TypeKindprotected UnresolvedType[]Iff isParameterized(), then these are the type parametersprotected TypeVariable[]Iff isGeneric(), then these are the type variables declared on the type Iff isParameterized(), then these are the type variables bound as parameters in the typestatic final UnresolvedType -
Constructor Summary
ConstructorsConstructorDescriptionArrayReferenceType(String sig, String erasureSig, World world, ResolvedType componentType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanNote: Only overridden by ReferenceType subtypebooleanEquality is checked based on the underlying signature.getAnnotationOfType(UnresolvedType ofType) Note: Only overridden by ReferenceType subtypeReturns a UnresolvedType object representing the component type of this array, or null if this type does not represent an array type.final ResolvedMember[]final ResolvedType[]Find out from the generic signature the true signature of any interfaces I implement.final ResolvedMember[]final ResolvedMember[]final intfinal ResolvedTypebooleanhasAnnotation(UnresolvedType ofType) booleanNote: Only overridden by Name subtype.booleanbooleanNote: Only overridden by Name subtype.booleanbooleanisAspect()final booleanDetermines if the variables of this type could be assigned values of another type without casting.booleanisAssignableFrom(ResolvedType o, boolean allowMissing) booleanisClass()final booleanDetermines if values of another type could possibly be cast to this type.booleanisEnum()Note: Only overridden by Name subtype.booleanbooleanbooleanbooleanisNested()booleanbooleanbooleanbooleanbooleanbooleanMethods inherited from class ReferenceType
addAnnotation, addParent, checkDuplicates, demoteToSimpleType, doesNotExposeShadowMungers, ensureConsistent, findDerivativeType, fromTypeX, getCompilerVersion, getDeclaredGenericSignature, getDeclares, getDelegate, getEndPos, getGenericSignature, getGenericType, getNameAsIdentifier, getOuterClass, getPerClause, getPrivilegedAccesses, getRetentionPolicy, getSignatureForAttribute, getSourceLocation, getStartPos, getTypeMungers, getWeaverState, hasAnnotations, hasNewInterfaces, setDelegate, setEndPos, setGenericType, setStartPosModifier and TypeMethodDescriptionvoidaddAnnotation(AnnotationAJ annotationX) voidaddParent(ResolvedType newParent) voidcheckDuplicates(ReferenceType newRt) voidbooleanvoidUndo any temporary modifications to the type (for example it may be holding annotations temporarily whilst some matching is occurring - These annotations will be added properly during weaving but sometimes for type completion they need to be held here for a while).findDerivativeType(ResolvedType[] typeParameters) Look for a derivative type with the specified type parameters.static ReferenceTypefromTypeX(UnresolvedType tx, World world) intreturn the weaver version used to build this type - defaults to the most recent version unless discovered otherwise.intOverridden by ReferenceType to return a sensible answer for parameterized and raw types.intbooleanbooleanvoidsetDelegate(ReferenceTypeDelegate delegate) voidsetEndPos(int endPos) voidvoidsetStartPos(int startPos) Methods inherited from class ResolvedType
addInterTypeMunger, ajMembersNeedParameterization, canBeSeenBy, checkInterTypeMungers, checkLegalOverride, clearInterTypeMungers, collectCrosscuttingMembers, collectDeclares, collectInterTypeMungers, conflictingSignature, conflictingSignature, discoverActualOccurrenceOfTypeInHierarchy, fillInAnyTypeParameters, findPointcut, getAjMemberParameterizationMap, getBinaryPath, getDeclaredAdvice, getDeclaredJavaFields, getDeclaredJavaMethods, getDeclaredShadowMungers, getDeclaringType, getDirectSupertypes, getExposedPointcuts, getFields, getHierarchy, getHierarchy, getHierarchyWithoutIterator, getInterTypeMungers, getInterTypeMungersIncludingSupers, getInterTypeParentMungers, getInterTypeParentMungersIncludingSupers, getMemberParameterizationMap, getMethods, getMethodsIncludingIntertypeDeclarations, getMethodsWithoutIterator, getPointcuts, getRawType, getResolvedTypeParameters, getSize, getTopmostImplementor, getWorld, isAbstract, isCacheable, isCheckedException, isConvertableFrom, isException, isFinal, isGroovyObject, isInheritedAnnotation, isInterface, isMissing, isMissing, isMoreVisible, isParameterizedWithTypeVariable, isPrivilegedAspect, isSynthetic, isTopmostImplementor, isTypeHierarchyComplete, isVisible, lookupDirectlyDeclaredMemberNoSupers, lookupField, lookupMemberIncludingITDsOnInterfaces, lookupMemberNoSupers, lookupMemberWithSupersAndITDs, lookupMethod, lookupMethodInITDs, lookupResolvedMember, lookupSyntheticMember, makeArray, matches, needsNoConversionFrom, parameterize, parameterizedWith, setBinaryPath, tagAsTypeHierarchyCompleteModifier and TypeMethodDescriptionvoidaddInterTypeMunger(ConcreteTypeMunger munger, boolean isDuringCompilation) Add an intertype munger to this type.protected booleanbooleancanBeSeenBy(ResolvedType from) voidCheck: 1) That we don't have any abstract type mungers unless this type is abstract.booleancheckLegalOverride(ResolvedMember parent, ResolvedMember child, int transformerPosition, ResolvedType aspectType) voidcollectCrosscuttingMembers(boolean shouldConcretizeIfNeeded) collectDeclares(boolean includeAdviceLike) protected voidcollectInterTypeMungers(List<ConcreteTypeMunger> collector) static booleanconflictingSignature(Member m1, Member m2) static booleanconflictingSignature(Member m1, Member m2, boolean v2itds) Do the two members conflict? Due to the change in 1.7.1, field itds on interfaces now act like 'default' fields - so types implementing those fields get the field if they don't have it already, otherwise they keep what they have.Look up the actual occurence of a particular type in the hierarchy for 'this' type.Called for all type mungers but only does something if they share type variables with a generic type which they target.findPointcut(String name) protected Map<String, UnresolvedType> Returns the path to the jar or class file from which this binary aspect came or null if not a binary aspectReturns a ResolvedType object representing the declaring type of this type, or null if this type does not represent a non-package-level-type.final Iterator<ResolvedType> Returns an iterator through ResolvedType objects representing all the direct supertypes of this type.returns an iterator through all of the fields of this type, in order for checking from JVM spec 2ed 5.4.3.2.Return an iterator over the types in this types hierarchy - starting with this type first, then all superclasses up to Object and then all interfaces (starting with those 'nearest' this type).getHierarchy(boolean wantGenerics, boolean wantDeclaredParents) Return an iterator over the types in this types hierarchy - starting with this type first, then all superclasses up to Object and then all interfaces (starting with those 'nearest' this type).getHierarchyWithoutIterator(boolean includeITDs, boolean allowMissing, boolean genericsAware) Return a list of the types in the hierarchy of this type, starting with this type.??? This method is O(N*M) where N = number of methods and M is number of inter-type declarations in my superprotected Map<String, UnresolvedType> getMethods(boolean wantGenerics, boolean wantDeclaredParents) returns an iterator through all of the methods of this type, in order for checking from JVM spec 2ed 5.4.3.3.getMethodsIncludingIntertypeDeclarations(boolean wantGenerics, boolean wantDeclaredParents) getMethodsWithoutIterator(boolean includeITDs, boolean allowMissing, boolean genericsAware) Return a list of methods, first those declared on this class, then those declared on the superclass (recurse) and then those declared on the superinterfaces.returns an iterator through all of the pointcuts of this type, in order for checking from JVM spec 2ed 5.4.3.2 (as for fields).intgetSize()This is the size of this type as used in JVM.getTopmostImplementor(ResolvedType interfaceType) getWorld()final booleanbooleanbooleanfinal booleanisConvertableFrom(ResolvedType other) Determines if variables of this type could be assigned values of another with lots of help.booleanfinal booleanisFinal()booleanbooleanFor an annotation type, this will return if it is marked with @Inheritedfinal booleanbooleanstatic booleanisMissing(UnresolvedType unresolved) static booleanisMoreVisible(int m1, int m2) booleanreturn true if the parameterization of this type includes a member type variable.booleanbooleanbooleanisTopmostImplementor(ResolvedType interfaceType) booleanstatic booleanisVisible(int modifiers, ResolvedType targetType, ResolvedType fromType) as lookupMemberNoSupers, but does not include ITDslookupField(Member field) described in JVM spec 2ed 5.4.3.2This lookup has specialized behaviour - a null result tells the EclipseTypeMunger that it should make a default implementation of a method on this type.lookupMemberNoSupers(Member member) Look up a member, takes into account any ITDs on this type.lookupMemberWithSupersAndITDs(Member member) described in JVM spec 2ed 5.4.3.3.lookupMethodInITDs(Member member) lookupResolvedMember(ResolvedMember aMember, boolean allowMissing, boolean eraseGenerics) Looks for the first member in the hierarchy matching aMember.lookupSyntheticMember(Member member) static ResolvedTypemakeArray(ResolvedType type, int dim) static booleanbooleanparameterize(Map<String, UnresolvedType> typeBindings) Iff I am a parameterized type, and any of my parameters are type variable references (or nested parameterized types), return a version with those type parameters replaced in accordance with the passed bindings.parameterizedWith(UnresolvedType[] typeParameters) voidsetBinaryPath(String binaryPath) voidMethods inherited from class UnresolvedType
add, forGenericType, forGenericTypeSignature, forGenericTypeVariables, forName, forNames, forPrimitiveType, forRawTypeName, forSignature, forSignatures, getBaseName, getClassName, getDimensions, getErasureSignature, getName, getNames, getOutermostType, getPackageName, getPackageNameAsIdentifier, getRawName, getSignature, getSimpleBaseName, getSimpleName, getTypekind, getTypeParameters, getTypeVariableNamed, hashCode, insert, isArray, isParameterizedOrGenericType, isParameterizedOrRawType, isVoid, makeArray, needsModifiableDelegate, read, readArray, resolve, setNeedsModifiableDelegate, toDebugString, toString, toTraceString, write, writeArrayModifier and TypeMethodDescriptionstatic UnresolvedType[]add(UnresolvedType[] types, UnresolvedType end) Creates a new type array with a fresh type appended to the end.static UnresolvedTypeforGenericType(String name, TypeVariable[] tvbs, String genericSig) static UnresolvedTypeforGenericTypeSignature(String sig, String declaredGenericSig) static UnresolvedTypeforGenericTypeVariables(String sig, TypeVariable[] tVars) static UnresolvedTypeNOTE: Use forSignature() if you can, it'll be cheaper ! Constructs a UnresolvedType for a java language type name.static UnresolvedType[]Constructs a UnresolvedType for each java language type name in an incoming array.static UnresolvedTypeforPrimitiveType(String signature) static UnresolvedTypeforRawTypeName(String name) static UnresolvedTypeforSignature(String signature) Constructs a Type for a JVM bytecode signature string.static UnresolvedType[]forSignatures(String[] sigs) Constructs a UnresolvedType for each JVM bytecode type signature in an incoming array.final intFor parameterized types, return the signature for the raw typegetName()Returns the name of this type in java language form (e.g.static String[]getNames(UnresolvedType[] types) Returns an array of strings representing the java langauge names of an array of types.Returns a UnresolvedType object representing the effective outermost enclosing type for a name type.Returns the name of this type in JVM signature form.getTypeVariableNamed(String name) inthashCode()Equality is checked based on the underlying signature, so the hash code of a particular type is the hash code of its signature string.static UnresolvedType[]insert(UnresolvedType start, UnresolvedType[] types) Creates a new type array with a fresh type inserted at the beginning.final booleanisArray()booleanbooleanbooleanisVoid()static UnresolvedTypemakeArray(UnresolvedType base, int dims) booleanstatic UnresolvedTypeRead in an UnresolvedType - just read the signature and rebuild the UnresolvedType.static UnresolvedType[]Returns a resolved version of this type according to a particular world.voidsetNeedsModifiableDelegate(boolean b) toString()Returns a java language string representation of this type.final voidWrite out an UnresolvedType - the signature should be enough.static voidwriteArray(UnresolvedType[] types, CompressingDataOutputStream stream)
-
Constructor Details
-
ArrayReferenceType
-
-
Method Details
-
getDeclaredFields
- Overrides:
getDeclaredFieldsin classReferenceType
-
getDeclaredMethods
- Overrides:
getDeclaredMethodsin classReferenceType
-
getDeclaredInterfaces
Description copied from class:ReferenceTypeFind out from the generic signature the true signature of any interfaces I implement. If I am parameterized, these may then need to be parameterized before returning.- Overrides:
getDeclaredInterfacesin classReferenceType
-
getAnnotationOfType
- Specified by:
getAnnotationOfTypein interfaceAnnotatedElement- Overrides:
getAnnotationOfTypein classReferenceType
-
getAnnotations
- Overrides:
getAnnotationsin classReferenceType
-
getAnnotationTypes
- Specified by:
getAnnotationTypesin interfaceAnnotatedElement- Overrides:
getAnnotationTypesin classReferenceType
-
getDeclaredPointcuts
- Overrides:
getDeclaredPointcutsin classReferenceType
-
hasAnnotation
- Specified by:
hasAnnotationin interfaceAnnotatedElement- Overrides:
hasAnnotationin classReferenceType
-
getSuperclass
- Overrides:
getSuperclassin classReferenceType- Returns:
- the superclass of this type, or null (if this represents a jlObject, primitive, or void)
-
isAssignableFrom
Description copied from class:ResolvedTypeDetermines if the variables of this type could be assigned values of another type without casting. This still allows for assignment conversion as per JLS 2ed 5.2. For object types, this means supertypeOrEqual(THIS, OTHER).- Overrides:
isAssignableFromin classReferenceType- Parameters:
o- the other type- Returns:
- true iff variables of this type could be assigned values of other without casting
-
isAssignableFrom
- Overrides:
isAssignableFromin classReferenceType
-
isCoerceableFrom
Description copied from class:ResolvedTypeDetermines if values of another type could possibly be cast to this type. The rules followed are from JLS 2ed 5.5, "Casting Conversion".This method should be commutative, i.e., for all UnresolvedType a, b and all World w:
a.isCoerceableFrom(b, w) == b.isCoerceableFrom(a, w)
- Overrides:
isCoerceableFromin classReferenceType- Parameters:
o- the other type- Returns:
- true iff values of other could possibly be cast to this type.
-
getModifiers
public final int getModifiers()- Overrides:
getModifiersin classReferenceType
-
getComponentType
Description copied from class:UnresolvedTypeReturns a UnresolvedType object representing the component type of this array, or null if this type does not represent an array type.- Overrides:
getComponentTypein classUnresolvedType- Returns:
- the component UnresolvedType object, or null.
-
getResolvedComponentType
- Overrides:
getResolvedComponentTypein classResolvedType
-
getSourceContext
- Overrides:
getSourceContextin classReferenceType
-
getTypeVariables
- Overrides:
getTypeVariablesin classReferenceType
-
isAnnotation
public boolean isAnnotation()Description copied from class:ResolvedTypeNote: Only overridden by Name subtype.- Overrides:
isAnnotationin classReferenceType
-
isAnonymous
public boolean isAnonymous()- Overrides:
isAnonymousin classReferenceType
-
isAnnotationStyleAspect
public boolean isAnnotationStyleAspect()- Overrides:
isAnnotationStyleAspectin classReferenceType
-
isAspect
public boolean isAspect()- Overrides:
isAspectin classReferenceType
-
isPrimitiveType
public boolean isPrimitiveType()- Overrides:
isPrimitiveTypein classUnresolvedType
-
isSimpleType
public boolean isSimpleType()- Overrides:
isSimpleTypein classUnresolvedType
-
isRawType
public boolean isRawType()- Overrides:
isRawTypein classUnresolvedType
-
isGenericType
public boolean isGenericType()- Overrides:
isGenericTypein classReferenceType
-
isParameterizedType
public boolean isParameterizedType()- Overrides:
isParameterizedTypein classUnresolvedType
-
isTypeVariableReference
public boolean isTypeVariableReference()- Overrides:
isTypeVariableReferencein classUnresolvedType
-
isGenericWildcard
public boolean isGenericWildcard()- Overrides:
isGenericWildcardin classUnresolvedType
-
isEnum
public boolean isEnum()Description copied from class:ResolvedTypeNote: Only overridden by Name subtype.- Overrides:
isEnumin classReferenceType
-
isNested
public boolean isNested()- Overrides:
isNestedin classReferenceType
-
isClass
public boolean isClass()- Overrides:
isClassin classReferenceType
-
isExposedToWeaver
public boolean isExposedToWeaver()- Overrides:
isExposedToWeaverin classReferenceType
-
canAnnotationTargetType
public boolean canAnnotationTargetType()Description copied from class:ResolvedTypeNote: Only overridden by ReferenceType subtype- Overrides:
canAnnotationTargetTypein classReferenceType
-
getAnnotationTargetKinds
Description copied from class:ResolvedTypeNote: Only overridden by ReferenceType subtype- Overrides:
getAnnotationTargetKindsin classReferenceType
-
isAnnotationWithRuntimeRetention
public boolean isAnnotationWithRuntimeRetention()Description copied from class:ResolvedTypeNote: Only overridden by Name subtype.- Overrides:
isAnnotationWithRuntimeRetentionin classReferenceType
-
isPrimitiveArray
public boolean isPrimitiveArray()- Overrides:
isPrimitiveArrayin classResolvedType
-
equals
Description copied from class:UnresolvedTypeEquality is checked based on the underlying signature.- Overrides:
equalsin classResolvedType
-