public final class LazyClassGen
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ObjectType |
enclosingStaticTjpType |
static ObjectType |
proceedingTjpType |
static ObjectType |
staticTjpType |
static ObjectType |
tjpType |
static ObjectType |
typeForAnnotation |
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(AnnotationGen a) |
void |
addAttribute(AjAttribute attribute) |
void |
addAttribute(Attribute 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() |
java.util.Collection<Attribute> |
getAttributes() |
BcelObjectType |
getBcelObjectType() |
java.util.List<UnwovenClassFile.ChildClass> |
getChildClasses(BcelWorld world) |
java.lang.String |
getClassName() |
ConstantPool |
getConstantPool() |
InstructionFactory |
getFactory() |
java.lang.String |
getFactoryMethod(Field field,
BcelShadow shadow) |
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) |
int |
getMajor() |
java.util.List<LazyMethodGen> |
getMethodGens() |
int |
getMinor() |
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 |
makeLdcClassString(UnresolvedType type) |
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 |
setMajorMinor(int major,
int minor) |
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) |
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
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)
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 void setMajorMinor(int major, int minor)
public int getMajor()
public int getMinor()
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 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 cachedpublic java.lang.String getFactoryMethod(Field field, BcelShadow shadow)
protected java.lang.String makeString(int i)
protected java.lang.String makeString(UnresolvedType t)
protected java.lang.String makeLdcClassString(UnresolvedType type)
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 void addAttribute(Attribute attribute)
public java.util.Collection<Attribute> getAttributes()
public boolean isAtLeastJava5()
public java.lang.String allocateField(java.lang.String prefix)