Package org.aspectj.weaver.bcel
Klasse LazyClassGen
java.lang.Object
org.aspectj.weaver.bcel.LazyClassGen
Lazy lazy lazy. We don't unpack the underlying class unless necessary. Things like new methods and annotations accumulate in here
until they must be written out, don't add them to the underlying MethodGen! Things are slightly different if this represents an
Aspect.
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final ObjectType
static final ObjectType
static final ObjectType
static final ObjectType
static final ObjectType
-
Konstruktorübersicht
KonstruktorBeschreibungLazyClassGen
(String class_name, String super_class_name, String file_name, int access_flags, String[] interfaces, World world) LazyClassGen
(BcelObjectType myType) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
void
addAttribute
(Attribute attribute) void
addAttribute
(AjAttribute attribute) void
addField
(FieldGen field, ISourceLocation sourceLocation) void
addGeneratedInner
(LazyClassGen newClass) void
addInterface
(ResolvedType newInterface, ISourceLocation sourceLocation) void
void
addMethodGen
(LazyMethodGen gen, ISourceLocation sourceLocation) allocateField
(String prefix) Return the next available field name with the specified 'prefix', e.g. for prefix 'class$' where class$0, class$1 exist then return class$2createExtendedAjcPreClinit
(LazyMethodGen previousPreClinit, int i) factory method for building multiple extended clinit methods.static void
disassemble
(String path, String name, PrintStream out) Emit disassembled class and newline to outvoid
errorOnAddedField
(FieldGen field, ISourceLocation sourceLocation) boolean
fieldExists
(String name) void
Retrieve the ajc$preClinit method - this method captures any initialization AspectJ wants to ensure happens in a class.getAnnotationCachingField
(BcelShadow shadow, ResolvedType toType, boolean isWithin) Create a field in the type containing the shadow where the annotation retrieved during binding can be stored - for later fast access.getChildClasses
(BcelWorld world) getFactoryMethod
(Field field, BcelShadow shadow) List<org.aspectj.weaver.bcel.BcelField>
String[]
getJavaClass
(BcelWorld world) byte[]
getLazyMethodGen
(String name, String signature) getLazyMethodGen
(String name, String signature, boolean allowMissing) int
getMajor()
int
getMinor()
getName()
getOrCreateWeaverStateInfo
(boolean inReweavableMode) Returns the packagename - if its the default package we return an empty stringgetTjpField
(BcelShadow shadow, boolean isEnclosingJp) getType()
getWorld()
boolean
static boolean
boolean
boolean
boolean
boolean
boolean
isWoven()
protected String
protected String
makeString
(int i) protected String
makeString
(String[] names) protected String
protected String
makeString
(UnresolvedType[] types) void
print()
void
print
(PrintStream out) boolean
void
setMajorMinor
(int major, int minor) void
setSuperClass
(ResolvedType newSuperclass) toString()
void
warnOnAddedInterface
(String name, ISourceLocation sourceLocation) void
warnOnAddedMethod
(Method method, ISourceLocation sourceLocation) void
warnOnAddedStaticInitializer
(Shadow shadow, ISourceLocation sourceLocation) void
warnOnModifiedSerialVersionUID
(ISourceLocation sourceLocation, String reason)
-
Felddetails
-
proceedingTjpType
-
tjpType
-
staticTjpType
-
typeForAnnotation
-
enclosingStaticTjpType
-
-
Konstruktordetails
-
LazyClassGen
-
LazyClassGen
-
-
Methodendetails
-
disassemble
Emit disassembled class and newline to out- Löst aus:
IOException
-
getNewGeneratedNameTag
-
setMajorMinor
public void setMajorMinor(int major, int minor) -
getMajor
public int getMajor() -
getMinor
public int getMinor() -
hasSerialVersionUIDField
-
getInternalClassName
-
getInternalFileName
-
getPackageName
Returns the packagename - if its the default package we return an empty string -
addMethodGen
-
removeMethodGen
-
addMethodGen
-
errorOnAddedField
-
warnOnAddedInterface
-
warnOnAddedMethod
-
warnOnAddedStaticInitializer
-
warnOnModifiedSerialVersionUID
-
getWorld
-
getMethodGens
-
getFieldGens
-
fieldExists
-
getJavaClass
-
getJavaClassBytesIncludingReweavable
-
addGeneratedInner
-
addInterface
-
setSuperClass
-
getSuperClass
-
getInterfaceNames
-
getChildClasses
-
toString
-
toShortString
-
toLongString
-
print
public void print() -
print
-
getConstantPool
-
getName
-
isWoven
public boolean isWoven() -
isReweavable
public boolean isReweavable() -
getAspectsAffectingType
-
getOrCreateWeaverStateInfo
-
getFactory
-
getStaticInitializer
-
getAjcPreClinit
Retrieve the ajc$preClinit method - this method captures any initialization AspectJ wants to ensure happens in a class. It is called from the static initializer. Maintaining this separation enables overweaving to ignore join points added due to earlier weaves. If the ajc$preClinit method cannot be found, it is created and a call to it is placed in the real static initializer (the call is placed at the start of the static initializer).- Gibt zurück:
- the LazyMethodGen representing the ajc$ clinit
-
createExtendedAjcPreClinit
factory method for building multiple extended clinit methods. Constructs a new clinit method that invokes the previous one and then returns it. The index is used as a name suffix.- Parameter:
previousPreClinit
-i
-
-
getTjpField
-
getAnnotationCachingField
Create a field in the type containing the shadow where the annotation retrieved during binding can be stored - for later fast access.- Parameter:
shadow
- the shadow at which the @annotation result is being cached- Gibt zurück:
- a field
-
getFactoryMethod
-
makeString
-
makeString
-
makeLdcClassString
-
makeString
-
makeString
-
getType
-
getBcelObjectType
-
getFileName
-
addField
-
getClassName
-
isInterface
public boolean isInterface() -
isAbstract
public boolean isAbstract() -
getLazyMethodGen
-
getLazyMethodGen
-
getLazyMethodGen
-
forcePublic
public void forcePublic() -
hasAnnotation
-
addAnnotation
-
addAttribute
-
addAttribute
-
getAttributes
-
isAtLeastJava5
public boolean isAtLeastJava5() -
allocateField
Return the next available field name with the specified 'prefix', e.g. for prefix 'class$' where class$0, class$1 exist then return class$2
-