Top Fields Constructors Methods
org.aspectj.weaver.bcel

public Class BcelObjectType

extends AbstractReferenceTypeDelegate
Class Inheritance
Imports
java.io.PrintStream, java.lang.ref.WeakReference, java.lang.reflect.Modifier, java.util.ArrayList, .Arrays, .Collection, .Collections, .List, .Set, org.aspectj.apache.bcel.classfile.Attribute, .AttributeUtils, .ConstantClass, .ConstantPool, .EnclosingMethod, .Field, .InnerClass, .InnerClasses, .JavaClass, .Method, .Signature, org.aspectj.apache.bcel.classfile.annotation.AnnotationGen, .EnumElementValue, .NameValuePair, org.aspectj.asm.AsmManager, org.aspectj.bridge.IMessageHandler, .MessageUtil, org.aspectj.util.GenericSignature, .GenericSignature.FormalTypeParameter, org.aspectj.weaver.AbstractReferenceTypeDelegate, .AjAttribute, .AjcMemberMaker, .AnnotationAJ, .AnnotationTargetKind, .BCException, .BindingScope, .ConcreteTypeMunger, .ISourceContext, .ReferenceType, .ResolvedMember, .ResolvedPointcutDefinition, .ResolvedType, .SourceContextImpl, .TypeVariable, .UnresolvedType, .WeaverStateInfo, .World, org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.GenericSignatureFormatException, org.aspectj.weaver.patterns.Declare, .DeclareErrorOrWarning, .DeclarePrecedence, .FormalBinding, .IScope, .PerClause

Field Summary

Modifier and TypeField and Description
private static final int
private AnnotationAJ[]
private AnnotationTargetKind[]
private ResolvedType[]
private boolean
private int
private String
private String
private List<Declare>
private static final int
private static final int
private static final int
private static final int
private ResolvedMember[]
private GenericSignature.FormalTypeParameter[]
private boolean
private String[]
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
public JavaClass
private LazyClassGen
private ResolvedMember[]
private int
private static final String[]
private PerClause
private ResolvedPointcutDefinition[]
private ResolvedMember[]
private String
private String
private String
private WeakReference<ResolvedType[]>
private WeakReference<ResolvedType>
private List<ConcreteTypeMunger>
private TypeVariable[]
private static final int
private static final int
private WeaverStateInfo
private AjAttribute.WeaverVersionInfo
Inherited from org.aspectj.weaver.AbstractReferenceTypeDelegate:
cachedGenericClassTypeSignatureexposedToWeaverresolvedTypeXUNKNOWN_SOURCE_FILE

Constructor Summary

AccessConstructor and Description
pack-priv
BcelObjectType(ReferenceType resolvedTypeX, JavaClass javaClass, boolean artificial, boolean exposedToWeaver)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
private void
private void
ensureAspectJAttributesUnpacked()

Process any org.aspectj.weaver attributes stored against the class.

public void
private void
private void
public void
public void
public GenericSignature.FormalTypeParameter[]
public AnnotationAJ[]
public AnnotationTargetKind[]
public ResolvedType[]
public int
getCompilerVersion()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.getCompilerVersion.

Implements org.aspectj.weaver.ReferenceTypeDelegate.getCompilerVersion.

If known, return the compiler/weaver version used to build this delegate.
public ResolvedMember[]
public String
public ResolvedType[]
getDeclaredInterfaces()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredInterfaces.

Retrieves the declared interfaces - this allows for the generic signature on a type.
public ResolvedMember[]
public ResolvedMember[]
public Collection<Declare>
public JavaClass
public LazyClassGen
getLazyClassGen()

Return the lazyClassGen associated with this type.

public int
public ResolvedType
public PerClause
public Collection<ResolvedMember>
public String
public ResolvedType
getSuperclass()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getSuperclass.

Must take into account generic signature
public Collection<ConcreteTypeMunger>
public TypeVariable[]
public WeaverStateInfo
public AjAttribute.WeaverVersionInfo
public World
public boolean
public boolean
public boolean
private void
public boolean
public boolean

Returns:

true for @AJ aspect
isAnnotationStyleAspect
()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnnotationStyleAspect.

Check if the type is an @AJ aspect (no matter if used from an LTW point of view).
public boolean
public boolean
public boolean

Returns:

true if built from bytes obtained from somewhere. False if built from bytes retrieved from disk.
isArtificial
()

public boolean
public boolean
isCacheable()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.isCacheable.

Implements org.aspectj.weaver.ReferenceTypeDelegate.isCacheable.

TODO Caching of methods besides getDeclaredInterfaces() may also be dependent on this flag - which?
public boolean
public boolean
public boolean
public boolean
public boolean
private boolean
public boolean
public void
private AjAttribute.Aspect
processAttributes(List<AjAttribute> attributeList, List<ResolvedPointcutDefinition> pointcuts, boolean fromAnnotations)

public void
private void
resolveAnnotationDeclares(List<AjAttribute> attributeList)

Extra processing step needed because declares that come from annotations are not pre-resolved.

public void
setExposedToWeaver(boolean b)

public void
setJavaClass(JavaClass newclass, boolean artificial)

pack-priv void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
Inherited from org.aspectj.weaver.AbstractReferenceTypeDelegate:
doesNotExposeShadowMungersgetFormalTypeParametersFromOuterClassgetGenericClassTypeSignaturegetResolvedTypeXgetSourceContextgetSourcefilenamegetSourceLocationisClassisExposedToWeaversetSourceContextsetSourcefilename

Field Detail

ANNOTATION_UNPACK_IN_PROGRESSback to summary
private static final int ANNOTATION_UNPACK_IN_PROGRESS
annotationsback to summary
private AnnotationAJ[] annotations
annotationTargetKindsback to summary
private AnnotationTargetKind[] annotationTargetKinds
annotationTypesback to summary
private ResolvedType[] annotationTypes
artificialback to summary
private boolean artificial
bitflagback to summary
private int bitflag
classNameback to summary
private String className
declaredSignatureback to summary
private String declaredSignature
declaresback to summary
private List<Declare> declares
DISCOVERED_ANNOTATION_RETENTION_POLICYback to summary
private static final int DISCOVERED_ANNOTATION_RETENTION_POLICY
DISCOVERED_ANNOTATION_TARGET_KINDSback to summary
private static final int DISCOVERED_ANNOTATION_TARGET_KINDS
DISCOVERED_DECLARED_SIGNATUREback to summary
private static final int DISCOVERED_DECLARED_SIGNATURE
DISCOVERED_WHETHER_ANNOTATION_STYLEback to summary
private static final int DISCOVERED_WHETHER_ANNOTATION_STYLE
fieldsback to summary
private ResolvedMember[] fields
formalsForResolutionback to summary
private GenericSignature.FormalTypeParameter[] formalsForResolution
hasBeenWovenback to summary
private boolean hasBeenWoven
interfaceSignaturesback to summary
private String[] interfaceSignatures
isAnnotationback to summary
private boolean isAnnotation
isAnnotationStyleAspectback to summary
private boolean isAnnotationStyleAspect
isAnonymousback to summary
private boolean isAnonymous
isCodeStyleAspectback to summary
private boolean isCodeStyleAspect
isEnumback to summary
private boolean isEnum
isGenericTypeback to summary
private boolean isGenericType
isInterfaceback to summary
private boolean isInterface
isNestedback to summary
private boolean isNested
isObjectback to summary
private boolean isObject
javaClassback to summary
public JavaClass javaClass
lazyClassGenback to summary
private LazyClassGen lazyClassGen
methodsback to summary
private ResolvedMember[] methods
modifiersback to summary
private int modifiers
NO_INTERFACE_SIGSback to summary
private static final String[] NO_INTERFACE_SIGS
perClauseback to summary
private PerClause perClause
pointcutsback to summary
private ResolvedPointcutDefinition[] pointcuts
privilegedAccessback to summary
private ResolvedMember[] privilegedAccess
retentionPolicyback to summary
private String retentionPolicy
superclassNameback to summary
private String superclassName
superclassSignatureback to summary
private String superclassSignature
superInterfaceReferencesback to summary
private WeakReference<ResolvedType[]> superInterfaceReferences
superTypeReferenceback to summary
private WeakReference<ResolvedType> superTypeReference
typeMungersback to summary
private List<ConcreteTypeMunger> typeMungers
typeVarsback to summary
private TypeVariable[] typeVars
UNPACKED_AJATTRIBUTESback to summary
private static final int UNPACKED_AJATTRIBUTES
UNPACKED_GENERIC_SIGNATUREback to summary
private static final int UNPACKED_GENERIC_SIGNATURE
weaverStateback to summary
private WeaverStateInfo weaverState
wvInfoback to summary
private AjAttribute.WeaverVersionInfo wvInfo

Constructor Detail

BcelObjectTypeback to summary
pack-priv BcelObjectType(ReferenceType resolvedTypeX, JavaClass javaClass, boolean artificial, boolean exposedToWeaver)

Method Detail

canAnnotationTargetTypeback to summary
public boolean canAnnotationTargetType()

Implements org.aspectj.weaver.ReferenceTypeDelegate.canAnnotationTargetType.

Returns:boolean

Doc from org.aspectj.weaver.ReferenceTypeDelegate.canAnnotationTargetType.

true if this annotation type can be on a regular type (ie. it doesn't specify anything or it specifies TYPE)

copySourceContextback to summary
public boolean copySourceContext()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.copySourceContext.

Implements org.aspectj.weaver.ReferenceTypeDelegate.copySourceContext.

Annotations
@Override
ensureAnnotationsUnpackedback to summary
private void ensureAnnotationsUnpacked()
ensureAspectJAttributesUnpackedback to summary
private void ensureAspectJAttributesUnpacked()

Process any org.aspectj.weaver attributes stored against the class.

ensureConsistentback to summary
public void ensureConsistent()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.ensureConsistent.

Implements org.aspectj.weaver.ReferenceTypeDelegate.ensureConsistent.

Doc from org.aspectj.weaver.ReferenceTypeDelegate.ensureConsistent.

Implementations need to clear state

ensureGenericInfoProcessedback to summary
private void ensureGenericInfoProcessed()
ensureGenericSignatureUnpackedback to summary
private void ensureGenericSignatureUnpacked()
evictWeavingStateback to summary
public void evictWeavingState()
finishedWithback to summary
public void finishedWith()
getAllFormalsback to summary
public GenericSignature.FormalTypeParameter[] getAllFormals()
getAnnotationsback to summary
public AnnotationAJ[] getAnnotations()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getAnnotations.

getAnnotationTargetKindsback to summary
public AnnotationTargetKind[] getAnnotationTargetKinds()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getAnnotationTargetKinds.

Returns:AnnotationTargetKind[]

Doc from org.aspectj.weaver.ReferenceTypeDelegate.getAnnotationTargetKinds.

all the possible targets that this annotation can be placed upon

getAnnotationTypesback to summary
public ResolvedType[] getAnnotationTypes()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getAnnotationTypes.

getCompilerVersionback to summary
public int getCompilerVersion()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.getCompilerVersion.

Implements org.aspectj.weaver.ReferenceTypeDelegate.getCompilerVersion.

Doc from org.aspectj.weaver.ReferenceTypeDelegate.getCompilerVersion.

If known, return the compiler/weaver version used to build this delegate. Default is the most recent level as specified in WeaverVersionInfo.

Returns:int

the major version

Annotations
@Override
getDeclaredFieldsback to summary
public ResolvedMember[] getDeclaredFields()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredFields.

getDeclaredGenericSignatureback to summary
public String getDeclaredGenericSignature()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredGenericSignature.

getDeclaredInterfacesback to summary
public ResolvedType[] getDeclaredInterfaces()

Implements org.aspectj.weaver.ReferenceTypeDelegate.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.

getDeclaredMethodsback to summary
public ResolvedMember[] getDeclaredMethods()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredMethods.

getDeclaredPointcutsback to summary
public ResolvedMember[] getDeclaredPointcuts()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredPointcuts.

getDeclaresback to summary
public Collection<Declare> getDeclares()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclares.

getJavaClassback to summary
public JavaClass getJavaClass()
getLazyClassGenback to summary
public LazyClassGen 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.

getModifiersback to summary
public int getModifiers()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getModifiers.

getOuterClassback to summary
public ResolvedType getOuterClass()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getOuterClass.

getPerClauseback to summary
public PerClause getPerClause()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getPerClause.

Returns:PerClause

Doc from org.aspectj.weaver.ReferenceTypeDelegate.getPerClause.

for an aspect declaration, return the

getPrivilegedAccessesback to summary
public Collection<ResolvedMember> getPrivilegedAccesses()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getPrivilegedAccesses.

getRetentionPolicyback to summary
public String getRetentionPolicy()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getRetentionPolicy.

getSuperclassback to summary
public ResolvedType getSuperclass()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getSuperclass.

Must take into account generic signature

getTypeMungersback to summary
public Collection<ConcreteTypeMunger> getTypeMungers()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getTypeMungers.

getTypeVariablesback to summary
public TypeVariable[] getTypeVariables()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getTypeVariables.

getWeaverStateback to summary
public WeaverStateInfo getWeaverState()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getWeaverState.

getWeaverVersionAttributeback to summary
public AjAttribute.WeaverVersionInfo getWeaverVersionAttribute()
getWorldback to summary
public World getWorld()
hasAnnotationback to summary
public boolean hasAnnotation(UnresolvedType ofType)

Implements org.aspectj.weaver.ReferenceTypeDelegate.hasAnnotation.

hasAnnotationsback to summary
public boolean hasAnnotations()

Implements org.aspectj.weaver.ReferenceTypeDelegate.hasAnnotations.

hasBeenWovenback to summary
public boolean hasBeenWoven()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.hasBeenWoven.

Implements org.aspectj.weaver.ReferenceTypeDelegate.hasBeenWoven.

initializeFromJavaclassback to summary
private void initializeFromJavaclass()
isAnnotationback to summary
public boolean isAnnotation()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnnotation.

isAnnotationStyleAspectback to summary
public boolean isAnnotationStyleAspect()

Implements org.aspectj.weaver.ReferenceTypeDelegate.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:boolean

true for @AJ aspect

isAnnotationWithRuntimeRetentionback to summary
public boolean isAnnotationWithRuntimeRetention()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnnotationWithRuntimeRetention.

Returns:boolean

Doc from org.aspectj.weaver.ReferenceTypeDelegate.isAnnotationWithRuntimeRetention.

true if this annotation type has a retention policy of RUNTIME

isAnonymousback to summary
public boolean isAnonymous()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnonymous.

isArtificialback to summary
public boolean isArtificial()
Returns:boolean

true if built from bytes obtained from somewhere. False if built from bytes retrieved from disk.

isAspectback to summary
public boolean isAspect()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAspect.

isCacheableback to summary
public boolean isCacheable()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.isCacheable.

Implements org.aspectj.weaver.ReferenceTypeDelegate.isCacheable.

Doc from org.aspectj.weaver.ReferenceTypeDelegate.isCacheable.

TODO Caching of methods besides getDeclaredInterfaces() may also be dependent on this flag - which?

Returns:boolean

true if something the result of getDeclaredInterfaces() can be cached by the caller

Annotations
@Override
isEnumback to summary
public boolean isEnum()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isEnum.

isGenericback to summary
public boolean isGeneric()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isGeneric.

isInterfaceback to summary
public boolean isInterface()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isInterface.

isNestedback to summary
public boolean isNested()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isNested.

Returns:boolean

Doc from org.aspectj.weaver.ReferenceTypeDelegate.isNested.

true if this class is nested (this includes: member classes, local classes, anonymous classes)

isSyntheticback to summary
public boolean isSynthetic()
isUnpackingAnnotationsback to summary
private boolean isUnpackingAnnotations()
isWeavableback to summary
public boolean isWeavable()

Overrides org.aspectj.weaver.AbstractReferenceTypeDelegate.isWeavable.

Implements org.aspectj.weaver.ReferenceTypeDelegate.isWeavable.

printWackyStuffback to summary
public void printWackyStuff(PrintStream out)
processAttributesback to summary
private AjAttribute.Aspect processAttributes(List<AjAttribute> attributeList, List<ResolvedPointcutDefinition> pointcuts, boolean fromAnnotations)
resetStateback to summary
public void resetState()
resolveAnnotationDeclaresback to summary
private void resolveAnnotationDeclares(List<AjAttribute> attributeList)

Extra processing step needed because declares that come from annotations are not pre-resolved. We can't do the resolution until *after* the pointcuts have been resolved.

setExposedToWeaverback to summary
public void setExposedToWeaver(boolean b)
setJavaClassback to summary
public void setJavaClass(JavaClass newclass, boolean artificial)
setWeaverStateback to summary
pack-priv void setWeaverState(WeaverStateInfo weaverState)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
weavingCompletedback to summary
public void weavingCompleted()