Package org.aspectj.weaver.bcel
Class LazyClassGen
- java.lang.Object
-
- org.aspectj.weaver.bcel.LazyClassGen
-
public final class LazyClassGen extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectTypeenclosingStaticTjpTypestatic ObjectTypeproceedingTjpTypestatic ObjectTypestaticTjpTypestatic ObjectTypetjpTypestatic ObjectTypetypeForAnnotation
-
Constructor Summary
Constructors Constructor Description LazyClassGen(String class_name, String super_class_name, String file_name, int access_flags, String[] interfaces, World world)LazyClassGen(BcelObjectType myType)
-
Method Summary
-
-
-
Field Detail
-
proceedingTjpType
public static final ObjectType proceedingTjpType
-
tjpType
public static final ObjectType tjpType
-
staticTjpType
public static final ObjectType staticTjpType
-
typeForAnnotation
public static final ObjectType typeForAnnotation
-
enclosingStaticTjpType
public static final ObjectType enclosingStaticTjpType
-
-
Method Detail
-
disassemble
public static void disassemble(String path, String name, PrintStream out) throws IOException
- Throws:
IOException
-
getNewGeneratedNameTag
public String getNewGeneratedNameTag()
-
setMajorMinor
public void setMajorMinor(int major, int minor)
-
getMajor
public int getMajor()
-
getMinor
public int getMinor()
-
hasSerialVersionUIDField
public static boolean hasSerialVersionUIDField(ResolvedType type)
-
getInternalClassName
public String getInternalClassName()
-
getInternalFileName
public String getInternalFileName()
-
getPackageName
public String getPackageName()
-
addMethodGen
public void addMethodGen(LazyMethodGen gen)
-
removeMethodGen
public boolean removeMethodGen(LazyMethodGen gen)
-
addMethodGen
public void addMethodGen(LazyMethodGen gen, ISourceLocation sourceLocation)
-
errorOnAddedField
public void errorOnAddedField(FieldGen field, ISourceLocation sourceLocation)
-
warnOnAddedInterface
public void warnOnAddedInterface(String name, ISourceLocation sourceLocation)
-
warnOnAddedMethod
public void warnOnAddedMethod(Method method, ISourceLocation sourceLocation)
-
warnOnAddedStaticInitializer
public void warnOnAddedStaticInitializer(Shadow shadow, ISourceLocation sourceLocation)
-
warnOnModifiedSerialVersionUID
public void warnOnModifiedSerialVersionUID(ISourceLocation sourceLocation, String reason)
-
getWorld
public World getWorld()
-
getMethodGens
public List<LazyMethodGen> getMethodGens()
-
getFieldGens
public List<org.aspectj.weaver.bcel.BcelField> getFieldGens()
-
fieldExists
public boolean fieldExists(String name)
-
getJavaClassBytesIncludingReweavable
public byte[] getJavaClassBytesIncludingReweavable(BcelWorld world)
-
addGeneratedInner
public void addGeneratedInner(LazyClassGen newClass)
-
addInterface
public void addInterface(ResolvedType newInterface, ISourceLocation sourceLocation)
-
setSuperClass
public void setSuperClass(ResolvedType newSuperclass)
-
getSuperClass
public ResolvedType getSuperClass()
-
getInterfaceNames
public String[] getInterfaceNames()
-
getChildClasses
public List<UnwovenClassFile.ChildClass> getChildClasses(BcelWorld world)
-
toShortString
public String toShortString()
-
toLongString
public String toLongString()
-
print
public void print()
-
print
public void print(PrintStream out)
-
getConstantPool
public ConstantPool getConstantPool()
-
getName
public String getName()
-
isWoven
public boolean isWoven()
-
isReweavable
public boolean isReweavable()
-
getOrCreateWeaverStateInfo
public WeaverStateInfo getOrCreateWeaverStateInfo(boolean inReweavableMode)
-
getFactory
public InstructionFactory getFactory()
-
getStaticInitializer
public LazyMethodGen getStaticInitializer()
-
getAjcPreClinit
public LazyMethodGen getAjcPreClinit()
-
createExtendedAjcPreClinit
public LazyMethodGen createExtendedAjcPreClinit(LazyMethodGen previousPreClinit, int i)
-
getTjpField
public Field getTjpField(BcelShadow shadow, boolean isEnclosingJp)
-
getAnnotationCachingField
public Field getAnnotationCachingField(BcelShadow shadow, ResolvedType toType, boolean isWithin)
-
getFactoryMethod
public String getFactoryMethod(Field field, BcelShadow shadow)
-
makeString
protected String makeString(int i)
-
makeString
protected String makeString(UnresolvedType t)
-
makeLdcClassString
protected String makeLdcClassString(UnresolvedType type)
-
makeString
protected String makeString(UnresolvedType[] types)
-
getType
public ResolvedType getType()
-
getBcelObjectType
public BcelObjectType getBcelObjectType()
-
getFileName
public String getFileName()
-
addField
public void addField(FieldGen field, ISourceLocation sourceLocation)
-
getClassName
public String getClassName()
-
isInterface
public boolean isInterface()
-
isAbstract
public boolean isAbstract()
-
getLazyMethodGen
public LazyMethodGen getLazyMethodGen(Member m)
-
getLazyMethodGen
public LazyMethodGen getLazyMethodGen(String name, String signature)
-
getLazyMethodGen
public LazyMethodGen getLazyMethodGen(String name, String signature, boolean allowMissing)
-
forcePublic
public void forcePublic()
-
hasAnnotation
public boolean hasAnnotation(UnresolvedType t)
-
addAnnotation
public void addAnnotation(AnnotationGen a)
-
addAttribute
public void addAttribute(AjAttribute attribute)
-
addAttribute
public void addAttribute(Attribute attribute)
-
getAttributes
public Collection<Attribute> getAttributes()
-
isAtLeastJava5
public boolean isAtLeastJava5()
-
-