|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.aspectj.weaver.bcel.LazyClassGen
public final class 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.
Field Summary | |
---|---|
static ObjectType |
enclosingStaticTjpType
|
static ObjectType |
proceedingTjpType
|
static ObjectType |
staticTjpType
|
static ObjectType |
tjpType
|
static ObjectType |
typeForAnnotation
|
Constructor Summary | |
---|---|
LazyClassGen(BcelObjectType myType)
|
|
LazyClassGen(java.lang.String class_name,
java.lang.String super_class_name,
java.lang.String file_name,
int access_flags,
java.lang.String[] interfaces,
World world)
|
Method Summary | |
---|---|
void |
addAnnotation(AnnotationGen a)
|
void |
addAttribute(AjAttribute attribute)
|
void |
addField(FieldGen field,
ISourceLocation sourceLocation)
|
void |
addGeneratedInner(LazyClassGen newClass)
|
void |
addInterface(ResolvedType newInterface,
ISourceLocation sourceLocation)
|
void |
addMethodGen(LazyMethodGen gen)
|
void |
addMethodGen(LazyMethodGen gen,
ISourceLocation sourceLocation)
|
java.lang.String |
allocateField(java.lang.String prefix)
Return the next available field name with the specified 'prefix', e.g. |
LazyMethodGen |
createExtendedAjcPreClinit(LazyMethodGen previousPreClinit,
int i)
factory method for building multiple extended clinit methods. |
static void |
disassemble(java.lang.String path,
java.lang.String name,
java.io.PrintStream out)
Emit disassembled class and newline to out |
void |
errorOnAddedField(FieldGen field,
ISourceLocation sourceLocation)
|
boolean |
fieldExists(java.lang.String name)
|
void |
forcePublic()
|
LazyMethodGen |
getAjcPreClinit()
Retrieve the ajc$preClinit method - this method captures any initialization AspectJ wants to ensure happens in a class. |
Field |
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. |
java.util.Set<java.lang.String> |
getAspectsAffectingType()
|
BcelObjectType |
getBcelObjectType()
|
java.util.List<UnwovenClassFile.ChildClass> |
getChildClasses(BcelWorld world)
|
java.lang.String |
getClassName()
|
ConstantPool |
getConstantPool()
|
InstructionFactory |
getFactory()
|
java.util.List<org.aspectj.weaver.bcel.BcelField> |
getFieldGens()
|
java.lang.String |
getFileName()
|
java.lang.String[] |
getInterfaceNames()
|
java.lang.String |
getInternalClassName()
|
java.lang.String |
getInternalFileName()
|
JavaClass |
getJavaClass(BcelWorld world)
|
byte[] |
getJavaClassBytesIncludingReweavable(BcelWorld world)
|
LazyMethodGen |
getLazyMethodGen(Member m)
|
LazyMethodGen |
getLazyMethodGen(java.lang.String name,
java.lang.String signature)
|
LazyMethodGen |
getLazyMethodGen(java.lang.String name,
java.lang.String signature,
boolean allowMissing)
|
java.util.List<LazyMethodGen> |
getMethodGens()
|
java.lang.String |
getName()
|
java.lang.String |
getNewGeneratedNameTag()
|
WeaverStateInfo |
getOrCreateWeaverStateInfo(boolean inReweavableMode)
|
java.lang.String |
getPackageName()
Returns the packagename - if its the default package we return an empty string |
LazyMethodGen |
getStaticInitializer()
|
ResolvedType |
getSuperClass()
|
Field |
getTjpField(BcelShadow shadow,
boolean isEnclosingJp)
|
ResolvedType |
getType()
|
World |
getWorld()
|
boolean |
hasAnnotation(UnresolvedType t)
|
static boolean |
hasSerialVersionUIDField(ResolvedType type)
|
boolean |
isAbstract()
|
boolean |
isAtLeastJava5()
|
boolean |
isInterface()
|
boolean |
isReweavable()
|
boolean |
isWoven()
|
protected java.lang.String |
makeString(int i)
|
protected java.lang.String |
makeString(java.lang.String[] names)
|
protected java.lang.String |
makeString(UnresolvedType t)
|
protected java.lang.String |
makeString(UnresolvedType[] types)
|
void |
print()
|
void |
print(java.io.PrintStream out)
|
boolean |
removeMethodGen(LazyMethodGen gen)
|
void |
setSuperClass(ResolvedType newSuperclass)
|
java.lang.String |
toLongString()
|
java.lang.String |
toShortString()
|
java.lang.String |
toString()
|
void |
warnOnAddedInterface(java.lang.String name,
ISourceLocation sourceLocation)
|
void |
warnOnAddedMethod(Method method,
ISourceLocation sourceLocation)
|
void |
warnOnAddedStaticInitializer(Shadow shadow,
ISourceLocation sourceLocation)
|
void |
warnOnModifiedSerialVersionUID(ISourceLocation sourceLocation,
java.lang.String reason)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ObjectType proceedingTjpType
public static final ObjectType tjpType
public static final ObjectType staticTjpType
public static final ObjectType typeForAnnotation
public static final ObjectType enclosingStaticTjpType
Constructor Detail |
---|
public LazyClassGen(java.lang.String class_name, java.lang.String super_class_name, java.lang.String file_name, int access_flags, java.lang.String[] interfaces, World world)
public LazyClassGen(BcelObjectType myType)
Method Detail |
---|
public static void disassemble(java.lang.String path, java.lang.String name, java.io.PrintStream out) throws java.io.IOException
java.io.IOException
public java.lang.String getNewGeneratedNameTag()
public static boolean hasSerialVersionUIDField(ResolvedType type)
public java.lang.String getInternalClassName()
public java.lang.String getInternalFileName()
public java.lang.String getPackageName()
public void addMethodGen(LazyMethodGen gen)
public boolean removeMethodGen(LazyMethodGen gen)
public void addMethodGen(LazyMethodGen gen, ISourceLocation sourceLocation)
public void errorOnAddedField(FieldGen field, ISourceLocation sourceLocation)
public void warnOnAddedInterface(java.lang.String name, ISourceLocation sourceLocation)
public void warnOnAddedMethod(Method method, ISourceLocation sourceLocation)
public void warnOnAddedStaticInitializer(Shadow shadow, ISourceLocation sourceLocation)
public void warnOnModifiedSerialVersionUID(ISourceLocation sourceLocation, java.lang.String reason)
public World getWorld()
public java.util.List<LazyMethodGen> getMethodGens()
public java.util.List<org.aspectj.weaver.bcel.BcelField> getFieldGens()
public boolean fieldExists(java.lang.String name)
public JavaClass getJavaClass(BcelWorld world)
public byte[] getJavaClassBytesIncludingReweavable(BcelWorld world)
public void addGeneratedInner(LazyClassGen newClass)
public void addInterface(ResolvedType newInterface, ISourceLocation sourceLocation)
public void setSuperClass(ResolvedType newSuperclass)
public ResolvedType getSuperClass()
public java.lang.String[] getInterfaceNames()
public java.util.List<UnwovenClassFile.ChildClass> getChildClasses(BcelWorld world)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toShortString()
public java.lang.String toLongString()
public void print()
public void print(java.io.PrintStream out)
public ConstantPool getConstantPool()
public java.lang.String getName()
public boolean isWoven()
public boolean isReweavable()
public java.util.Set<java.lang.String> getAspectsAffectingType()
public WeaverStateInfo getOrCreateWeaverStateInfo(boolean inReweavableMode)
public InstructionFactory getFactory()
public LazyMethodGen getStaticInitializer()
public LazyMethodGen getAjcPreClinit()
public LazyMethodGen createExtendedAjcPreClinit(LazyMethodGen previousPreClinit, int i)
previousPreClinit
- i
- public Field getTjpField(BcelShadow shadow, boolean isEnclosingJp)
public Field getAnnotationCachingField(BcelShadow shadow, ResolvedType toType, boolean isWithin)
shadow
- the shadow at which the @annotation result is being cached
protected java.lang.String makeString(int i)
protected java.lang.String makeString(UnresolvedType t)
protected java.lang.String makeString(UnresolvedType[] types)
protected java.lang.String makeString(java.lang.String[] names)
public ResolvedType getType()
public BcelObjectType getBcelObjectType()
public java.lang.String getFileName()
public void addField(FieldGen field, ISourceLocation sourceLocation)
public java.lang.String getClassName()
public boolean isInterface()
public boolean isAbstract()
public LazyMethodGen getLazyMethodGen(Member m)
public LazyMethodGen getLazyMethodGen(java.lang.String name, java.lang.String signature)
public LazyMethodGen getLazyMethodGen(java.lang.String name, java.lang.String signature, boolean allowMissing)
public void forcePublic()
public boolean hasAnnotation(UnresolvedType t)
public void addAnnotation(AnnotationGen a)
public void addAttribute(AjAttribute attribute)
public boolean isAtLeastJava5()
public java.lang.String allocateField(java.lang.String prefix)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |