Package org.aspectj.weaver.bcel
Class BcelObjectType
java.lang.Object
org.aspectj.weaver.AbstractReferenceTypeDelegate
org.aspectj.weaver.bcel.BcelObjectType
- All Implemented Interfaces:
ReferenceTypeDelegate
-
Field Summary
Fields inherited from class org.aspectj.weaver.AbstractReferenceTypeDelegate
cachedGenericClassTypeSignature, exposedToWeaver, resolvedTypeX, UNKNOWN_SOURCE_FILE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
Implementations need to clear statevoid
void
int
If known, return the compiler/weaver version used to build this delegate.Retrieves the declared interfaces - this allows for the generic signature on a type.Return the lazyClassGen associated with this type.int
Must take into account generic signaturegetWorld()
boolean
hasAnnotation(UnresolvedType ofType)
boolean
boolean
boolean
boolean
Check if the type is an @AJ aspect (no matter if used from an LTW point of view).boolean
boolean
boolean
boolean
isAspect()
boolean
TODO Caching of methods besides getDeclaredInterfaces() may also be dependent on this flag - which?boolean
isEnum()
boolean
boolean
boolean
isNested()
boolean
boolean
void
printWackyStuff(PrintStream out)
void
void
setExposedToWeaver(boolean b)
void
setJavaClass(JavaClass newclass, boolean artificial)
toString()
void
Methods inherited from class org.aspectj.weaver.AbstractReferenceTypeDelegate
doesNotExposeShadowMungers, getFormalTypeParametersFromOuterClass, getGenericClassTypeSignature, getResolvedTypeX, getSourceContext, getSourcefilename, getSourceLocation, isClass, isExposedToWeaver, setSourceContext, setSourcefilename
-
Field Details
-
javaClass
-
-
Method Details
-
setJavaClass
-
isCacheable
public boolean isCacheable()Description copied from interface:ReferenceTypeDelegate
TODO Caching of methods besides getDeclaredInterfaces() may also be dependent on this flag - which?- Specified by:
isCacheable
in interfaceReferenceTypeDelegate
- Overrides:
isCacheable
in classAbstractReferenceTypeDelegate
- Returns:
- true if something the result of getDeclaredInterfaces() can be cached by the caller
-
isInterface
public boolean isInterface() -
isEnum
public boolean isEnum() -
isAnnotation
public boolean isAnnotation() -
isAnonymous
public boolean isAnonymous() -
isNested
public boolean isNested()- Returns:
- true if this class is nested (this includes: member classes, local classes, anonymous classes)
-
getModifiers
public int getModifiers() -
getSuperclass
Must take into account generic signature -
getWorld
-
getDeclaredInterfaces
Retrieves the declared interfaces - this allows for the generic signature on a type. If specified then the generic signature is used to work out the types - this gets around the results of erasure when the class was originally compiled. -
getDeclaredMethods
-
getDeclaredFields
-
getTypeVariables
-
getTypeMungers
-
getDeclares
-
getPrivilegedAccesses
-
getDeclaredPointcuts
-
isAspect
public boolean isAspect() -
isAnnotationStyleAspect
public boolean isAnnotationStyleAspect()Check if the type is an @AJ aspect (no matter if used from an LTW point of view). Such aspects are annotated with @Aspect- Returns:
- true for @AJ aspect
-
getPerClause
- Returns:
- for an aspect declaration, return the
-
getJavaClass
-
isArtificial
public boolean isArtificial()- Returns:
- true if built from bytes obtained from somewhere. False if built from bytes retrieved from disk.
-
resetState
public void resetState() -
finishedWith
public void finishedWith() -
getWeaverState
-
printWackyStuff
-
getLazyClassGen
Return the lazyClassGen associated with this type. For aspect types, this value will be cached, since it is used to inline advice. For non-aspect types, this lazyClassGen is always newly constructed. -
isSynthetic
public boolean isSynthetic() -
getWeaverVersionAttribute
-
getAnnotationTypes
-
getAnnotations
-
hasAnnotations
public boolean hasAnnotations() -
hasAnnotation
-
isAnnotationWithRuntimeRetention
public boolean isAnnotationWithRuntimeRetention()- Returns:
- true if this annotation type has a retention policy of RUNTIME
-
getRetentionPolicy
-
canAnnotationTargetType
public boolean canAnnotationTargetType()- Returns:
- true if this annotation type can be on a regular type (ie. it doesn't specify anything or it specifies TYPE)
-
getAnnotationTargetKinds
- Returns:
- all the possible targets that this annotation can be placed upon
-
getDeclaredGenericSignature
-
getAllFormals
-
getOuterClass
-
isGeneric
public boolean isGeneric() -
toString
-
evictWeavingState
public void evictWeavingState() -
weavingCompleted
public void weavingCompleted() -
hasBeenWoven
public boolean hasBeenWoven()- Specified by:
hasBeenWoven
in interfaceReferenceTypeDelegate
- Overrides:
hasBeenWoven
in classAbstractReferenceTypeDelegate
-
copySourceContext
public boolean copySourceContext()- Specified by:
copySourceContext
in interfaceReferenceTypeDelegate
- Overrides:
copySourceContext
in classAbstractReferenceTypeDelegate
-
setExposedToWeaver
public void setExposedToWeaver(boolean b) -
getCompilerVersion
public int getCompilerVersion()Description copied from interface:ReferenceTypeDelegate
If known, return the compiler/weaver version used to build this delegate. Default is the most recent level as specified inAjAttribute.WeaverVersionInfo
.- Specified by:
getCompilerVersion
in interfaceReferenceTypeDelegate
- Overrides:
getCompilerVersion
in classAbstractReferenceTypeDelegate
- Returns:
- the major version
-
ensureConsistent
public void ensureConsistent()Description copied from interface:ReferenceTypeDelegate
Implementations need to clear state- Specified by:
ensureConsistent
in interfaceReferenceTypeDelegate
- Overrides:
ensureConsistent
in classAbstractReferenceTypeDelegate
-
isWeavable
public boolean isWeavable()- Specified by:
isWeavable
in interfaceReferenceTypeDelegate
- Overrides:
isWeavable
in classAbstractReferenceTypeDelegate
-