org.aspectj.weaver
Class MissingResolvedTypeWithKnownSignature
java.lang.Object
org.aspectj.weaver.UnresolvedType
org.aspectj.weaver.ResolvedType
org.aspectj.weaver.MissingResolvedTypeWithKnownSignature
- All Implemented Interfaces:
- AnnotatedElement, Traceable, TypeVariableDeclaringElement
public class MissingResolvedTypeWithKnownSignature
- extends ResolvedType
When we try to resolve a type in the world that we require to be present, and then fail to find it, we return an instance of this
class. This class defers the production of the "can't find type error" until the first time that someone asks a question that
can't be answered solely from the signature. This enables the weaver to be more tolerant of missing types.
Fields inherited from class org.aspectj.weaver.UnresolvedType |
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, RUNTIME_EXCEPTION, SERIALIZABLE, SHORT, signature, signatureErasure, SOMETHING, SUPPRESS_AJ_WARNINGS, THROWABLE, typeKind, typeParameters, typeVariables, VOID |
Methods inherited from class org.aspectj.weaver.ResolvedType |
addAnnotation, addInterTypeMunger, addParent, ajMembersNeedParameterization, canAnnotationTargetType, checkInterTypeMungers, checkLegalOverride, clearInterTypeMungers, collectCrosscuttingMembers, collectDeclares, conflictingSignature, discoverActualOccurrenceOfTypeInHierarchy, doesNotExposeShadowMungers, ensureConsistent, equals, fillInAnyTypeParameters, findPointcut, getAjMemberParameterizationMap, getAnnotationOfType, getAnnotationTargetKinds, getAnnotationTypes, getBinaryPath, getCompilerVersion, getDeclaredAdvice, getDeclaredJavaFields, getDeclaredJavaMethods, getDeclaredShadowMungers, getDeclares, getDeclaringType, getDirectSupertypes, getExposedPointcuts, getFields, getGenericType, getHierarchy, getHierarchy, getHierarchyWithoutIterator, getMemberParameterizationMap, getMethods, getMethodsIncludingIntertypeDeclarations, getMethodsWithoutIterator, getPerClause, getPointcuts, getPrivilegedAccesses, getRawType, getResolvedComponentType, getResolvedTypeParameters, getSignatureForAttribute, getSize, getSourceLocation, getTopmostImplementor, getTypeMungers, getWeaverState, getWorld, isAbstract, isAnnotation, isAnnotationStyleAspect, isAnnotationWithRuntimeRetention, isAnonymous, isAspect, isCacheable, isCheckedException, isClass, isConvertableFrom, isEnum, isException, isExposedToWeaver, isFinal, isGroovyObject, isInheritedAnnotation, isInterface, isMissing, isMoreVisible, isNested, isParameterizedWithTypeVariable, isPrimitiveArray, isSynthetic, isTopmostImplementor, isTypeHierarchyComplete, isVisible, lookupDirectlyDeclaredMemberNoSupers, lookupField, lookupMemberIncludingITDsOnInterfaces, lookupMemberNoSupers, lookupMemberWithSupersAndITDs, lookupMethod, lookupMethodInITDs, lookupResolvedMember, lookupSyntheticMember, makeArray, matches, needsNoConversionFrom, parameterize, parameterizedWith, setBinaryPath, tagAsTypeHierarchyComplete |
Methods inherited from class org.aspectj.weaver.UnresolvedType |
add, forGenericType, forGenericTypeSignature, forGenericTypeVariables, forName, forNames, forPrimitiveType, forRawTypeName, forSignature, forSignatures, getBaseName, getClassName, getComponentType, getErasureSignature, getName, getNameAsIdentifier, getNames, getOutermostType, getPackageName, getPackageNameAsIdentifier, getRawName, getSignature, getSimpleBaseName, getSimpleName, getTypekind, getTypeParameters, getTypeVariableNamed, getTypeVariables, hashCode, insert, isArray, isGenericType, isGenericWildcard, isParameterizedOrGenericType, isParameterizedOrRawType, isParameterizedType, isPrimitiveType, isRawType, isSimpleType, isTypeVariableReference, isVoid, makeArray, needsModifiableDelegate, read, readArray, resolve, setNeedsModifiableDelegate, toDebugString, toString, toTraceString, write, writeArray |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
MissingResolvedTypeWithKnownSignature
public MissingResolvedTypeWithKnownSignature(java.lang.String signature,
World world)
- Parameters:
signature
- world
-
MissingResolvedTypeWithKnownSignature
public MissingResolvedTypeWithKnownSignature(java.lang.String signature,
java.lang.String signatureErasure,
World world)
- Parameters:
signature
- signatureErasure
- world
-
isMissing
public boolean isMissing()
- Overrides:
isMissing
in class ResolvedType
getDeclaredFields
public ResolvedMember[] getDeclaredFields()
- Specified by:
getDeclaredFields
in class ResolvedType
getDeclaredMethods
public ResolvedMember[] getDeclaredMethods()
- Specified by:
getDeclaredMethods
in class ResolvedType
getAnnotations
public AnnotationAJ[] getAnnotations()
- Overrides:
getAnnotations
in class ResolvedType
getDeclaredInterfaces
public ResolvedType[] getDeclaredInterfaces()
- Specified by:
getDeclaredInterfaces
in class ResolvedType
getDeclaredPointcuts
public ResolvedMember[] getDeclaredPointcuts()
- Specified by:
getDeclaredPointcuts
in class ResolvedType
getSuperclass
public ResolvedType getSuperclass()
- Specified by:
getSuperclass
in class ResolvedType
- Returns:
- the superclass of this type, or null (if this represents a jlObject, primitive, or void)
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in class ResolvedType
getSourceContext
public ISourceContext getSourceContext()
- Specified by:
getSourceContext
in class ResolvedType
isAssignableFrom
public boolean isAssignableFrom(ResolvedType other)
- Description copied from class:
ResolvedType
- Determines 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).
- Specified by:
isAssignableFrom
in class ResolvedType
- Parameters:
other
- the other type
- Returns:
- true iff variables of this type could be assigned values of other without casting
isAssignableFrom
public boolean isAssignableFrom(ResolvedType other,
boolean allowMissing)
- Specified by:
isAssignableFrom
in class ResolvedType
isCoerceableFrom
public boolean isCoerceableFrom(ResolvedType other)
- Description copied from class:
ResolvedType
- Determines 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)
- Specified by:
isCoerceableFrom
in class ResolvedType
- Parameters:
other
- the other type
- Returns:
- true iff values of other could possibly be cast to this type.
hasAnnotation
public boolean hasAnnotation(UnresolvedType ofType)
getInterTypeMungers
public java.util.List getInterTypeMungers()
- Overrides:
getInterTypeMungers
in class ResolvedType
getInterTypeMungersIncludingSupers
public java.util.List getInterTypeMungersIncludingSupers()
- Description copied from class:
ResolvedType
- ??? This method is O(N*M) where N = number of methods and M is number of inter-type declarations in my super
- Overrides:
getInterTypeMungersIncludingSupers
in class ResolvedType
getInterTypeParentMungers
public java.util.List getInterTypeParentMungers()
- Overrides:
getInterTypeParentMungers
in class ResolvedType
getInterTypeParentMungersIncludingSupers
public java.util.List getInterTypeParentMungersIncludingSupers()
- Overrides:
getInterTypeParentMungersIncludingSupers
in class ResolvedType
collectInterTypeMungers
protected void collectInterTypeMungers(java.util.List collector)
- Overrides:
collectInterTypeMungers
in class ResolvedType
raiseWarningOnJoinPointSignature
public void raiseWarningOnJoinPointSignature(java.lang.String signature)
raiseWarningOnMissingInterfaceWhilstFindingMethods
public void raiseWarningOnMissingInterfaceWhilstFindingMethods()