org.aspectj.weaver.bcel
Class BcelObjectType

java.lang.Object
  extended by org.aspectj.weaver.AbstractReferenceTypeDelegate
      extended by org.aspectj.weaver.bcel.BcelObjectType
All Implemented Interfaces:
ReferenceTypeDelegate

public class BcelObjectType
extends AbstractReferenceTypeDelegate


Field Summary
 JavaClass javaClass
           
 
Fields inherited from class org.aspectj.weaver.AbstractReferenceTypeDelegate
cachedGenericClassTypeSignature, exposedToWeaver, resolvedTypeX, UNKNOWN_SOURCE_FILE
 
Method Summary
 boolean canAnnotationTargetType()
           
 boolean copySourceContext()
           
 void ensureConsistent()
          Implementations need to clear state
 void evictWeavingState()
           
 void finishedWith()
           
 GenericSignature.FormalTypeParameter[] getAllFormals()
           
 AnnotationAJ[] getAnnotations()
           
 AnnotationTargetKind[] getAnnotationTargetKinds()
           
 ResolvedType[] getAnnotationTypes()
           
 int getCompilerVersion()
          If known, return the compiler/weaver version used to build this delegate.
 ResolvedMember[] getDeclaredFields()
           
 java.lang.String getDeclaredGenericSignature()
           
 ResolvedType[] getDeclaredInterfaces()
          Retrieves the declared interfaces - this allows for the generic signature on a type.
 ResolvedMember[] getDeclaredMethods()
           
 ResolvedMember[] getDeclaredPointcuts()
           
 java.util.Collection<Declare> getDeclares()
           
 JavaClass getJavaClass()
           
 LazyClassGen getLazyClassGen()
          Return the lazyClassGen associated with this type.
 int getModifiers()
           
 ResolvedType getOuterClass()
           
 PerClause getPerClause()
           
 java.util.Collection<ResolvedMember> getPrivilegedAccesses()
           
 java.lang.String getRetentionPolicy()
           
 ResolvedType getSuperclass()
          Must take into account generic signature
 java.util.Collection<ConcreteTypeMunger> getTypeMungers()
           
 TypeVariable[] getTypeVariables()
           
 WeaverStateInfo getWeaverState()
           
 AjAttribute.WeaverVersionInfo getWeaverVersionAttribute()
           
 World getWorld()
           
 boolean hasAnnotation(UnresolvedType ofType)
           
 boolean hasBeenWoven()
           
 boolean isAnnotation()
           
 boolean isAnnotationStyleAspect()
          Check if the type is an @AJ aspect (no matter if used from an LTW point of view).
 boolean isAnnotationWithRuntimeRetention()
           
 boolean isAnonymous()
           
 boolean isArtificial()
           
 boolean isAspect()
           
 boolean isCacheable()
          TODO Caching of methods besides getDeclaredInterfaces() may also be dependent on this flag - which?
 boolean isEnum()
           
 boolean isGeneric()
           
 boolean isInterface()
           
 boolean isNested()
           
 boolean isSynthetic()
           
 boolean isWeavable()
           
 void printWackyStuff(java.io.PrintStream out)
           
 void resetState()
           
 void setExposedToWeaver(boolean b)
           
 void setJavaClass(JavaClass newclass, boolean artificial)
           
 java.lang.String toString()
           
 void weavingCompleted()
           
 
Methods inherited from class org.aspectj.weaver.AbstractReferenceTypeDelegate
doesNotExposeShadowMungers, getFormalTypeParametersFromOuterClass, getGenericClassTypeSignature, getResolvedTypeX, getSourceContext, getSourcefilename, getSourceLocation, isClass, isExposedToWeaver, setSourceContext, setSourcefilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

javaClass

public JavaClass javaClass
Method Detail

setJavaClass

public void setJavaClass(JavaClass newclass,
                         boolean artificial)

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 interface ReferenceTypeDelegate
Overrides:
isCacheable in class AbstractReferenceTypeDelegate
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

public ResolvedType getSuperclass()
Must take into account generic signature


getWorld

public World getWorld()

getDeclaredInterfaces

public ResolvedType[] 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

public ResolvedMember[] getDeclaredMethods()

getDeclaredFields

public ResolvedMember[] getDeclaredFields()

getTypeVariables

public TypeVariable[] getTypeVariables()

getTypeMungers

public java.util.Collection<ConcreteTypeMunger> getTypeMungers()

getDeclares

public java.util.Collection<Declare> getDeclares()

getPrivilegedAccesses

public java.util.Collection<ResolvedMember> getPrivilegedAccesses()

getDeclaredPointcuts

public ResolvedMember[] 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

public PerClause getPerClause()
Returns:
for an aspect declaration, return the

getJavaClass

public JavaClass getJavaClass()

isArtificial

public boolean isArtificial()

resetState

public void resetState()

finishedWith

public void finishedWith()

getWeaverState

public WeaverStateInfo getWeaverState()

printWackyStuff

public void printWackyStuff(java.io.PrintStream out)

getLazyClassGen

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.


isSynthetic

public boolean isSynthetic()

getWeaverVersionAttribute

public AjAttribute.WeaverVersionInfo getWeaverVersionAttribute()

getAnnotationTypes

public ResolvedType[] getAnnotationTypes()

getAnnotations

public AnnotationAJ[] getAnnotations()

hasAnnotation

public boolean hasAnnotation(UnresolvedType ofType)

isAnnotationWithRuntimeRetention

public boolean isAnnotationWithRuntimeRetention()
Returns:
true if this annotation type has a retention policy of RUNTIME

getRetentionPolicy

public java.lang.String 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

public AnnotationTargetKind[] getAnnotationTargetKinds()
Returns:
all the possible targets that this annotation can be placed upon

getDeclaredGenericSignature

public java.lang.String getDeclaredGenericSignature()

getAllFormals

public GenericSignature.FormalTypeParameter[] getAllFormals()

getOuterClass

public ResolvedType getOuterClass()

isGeneric

public boolean isGeneric()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

evictWeavingState

public void evictWeavingState()

weavingCompleted

public void weavingCompleted()

hasBeenWoven

public boolean hasBeenWoven()
Specified by:
hasBeenWoven in interface ReferenceTypeDelegate
Overrides:
hasBeenWoven in class AbstractReferenceTypeDelegate

copySourceContext

public boolean copySourceContext()
Specified by:
copySourceContext in interface ReferenceTypeDelegate
Overrides:
copySourceContext in class AbstractReferenceTypeDelegate

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 in AjAttribute.WeaverVersionInfo.

Specified by:
getCompilerVersion in interface ReferenceTypeDelegate
Overrides:
getCompilerVersion in class AbstractReferenceTypeDelegate
Returns:
the major version

ensureConsistent

public void ensureConsistent()
Description copied from interface: ReferenceTypeDelegate
Implementations need to clear state

Specified by:
ensureConsistent in interface ReferenceTypeDelegate
Overrides:
ensureConsistent in class AbstractReferenceTypeDelegate

isWeavable

public boolean isWeavable()
Specified by:
isWeavable in interface ReferenceTypeDelegate
Overrides:
isWeavable in class AbstractReferenceTypeDelegate