Top Description Inners Fields Constructors Methods
org.aspectj.weaver.bcel

public final Class LazyClassGen

extends Object
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .File, .IOException, .PrintStream, java.lang.reflect.Modifier, java.util.ArrayList, .Collection, .Collections, .Comparator, .HashMap, .Iterator, .List, .Map, .Set, .SortedMap, .TreeMap, .Vector, org.aspectj.apache.bcel.Constants, org.aspectj.apache.bcel.classfile.Attribute, .ConstantPool, .Field, .JavaClass, .Method, .Signature, .Synthetic, org.aspectj.apache.bcel.classfile.annotation.AnnotationGen, org.aspectj.apache.bcel.generic.BasicType, .ClassGen, .FieldGen, .InstructionConstants, .InstructionFactory, .InstructionHandle, .InstructionList, .ObjectType, .Type, org.aspectj.bridge.IMessage, .ISourceLocation, .SourceLocation, org.aspectj.weaver.AjAttribute, .AjAttribute.WeaverState, .AjAttribute.WeaverVersionInfo, .BCException, .Member, .MemberKind, .NameMangler, .ResolvedMember, .ResolvedType, .RuntimeVersion, .Shadow, .SignatureUtils, .TypeVariable, .UnresolvedType, .UnresolvedType.TypeKind, .WeaverMessages, .WeaverStateInfo, .World, org.aspectj.weaver.bcel.asm.AsmDetector, .StackMapAdder

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final int
private int
pack-priv Map<LazyClassGen.CacheKey, Field>
private final List<AnnotationGen>
private static final Type[]
private static final Type[]
private long
private int
private final List<LazyClassGen>
private static final ObjectType
private final ConstantPool
public static final ObjectType
private ResolvedType[]
private final InstructionFactory
private static final ObjectType
private final List<BcelField>
private boolean
private boolean
pack-priv int
private final SortedMap<String, LazyClassGen.InlinedSourceFileInfo>
private boolean
private final List<LazyMethodGen>
private ClassGen
private BcelObjectType
private static final String[]
private final String
private static final Type[]
private static final Type[]
private static final Type[]
private static final Type[]
private static final Type[]
private static final Type[]
private static final Type[]
public static final ObjectType
private boolean
private boolean
private static final ObjectType
public static final ObjectType
private ResolvedType
private Map<BcelShadow, Field>
private int
public static final ObjectType
public static final ObjectType
private final World

Constructor Summary

AccessConstructor and Description
public
LazyClassGen(String class_name, String super_class_name, String file_name, int access_flags, String[] interfaces, World world)

public

Method Summary

Modifier and TypeMethod and Description
private void
public void
public void
public void
private void
public void
addField(FieldGen field, ISourceLocation sourceLocation)

public void
pack-priv void
addInlinedSourceFileInfo(String fullpath, int highestLineNumber)

public void
addInterface(ResolvedType newInterface, ISourceLocation sourceLocation)

public void
public void
public String
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$2

pack-priv void
public LazyMethodGen
createExtendedAjcPreClinit(LazyMethodGen previousPreClinit, int i)

factory method for building multiple extended clinit methods.

private Signature
createSignatureAttribute(String signature)

Helper method to create a signature attribute based on a string signature: e.g. "Ljava/lang/Object;LI<ljava lang double;>;"

public static void
disassemble(String path, String name, PrintStream out)

Emit disassembled class and newline to out

public void
public boolean
private void
fixupGenericSignatureAttribute()

When working with Java generics, a signature attribute is attached to the type which indicates how it was declared.

public void
public LazyMethodGen

Returns:

the LazyMethodGen representing the ajc$ clinit
getAjcPreClinit
()

Retrieve the ajc$preClinit method - this method captures any initialization AspectJ wants to ensure happens in a class.

public Field

Returns:

a field
getAnnotationCachingField
(BcelShadow
the shadow at which the @annotation result is being cached
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.

public Set<String>
public Collection<Attribute>
public BcelObjectType
public List<UnwovenClassFile.ChildClass>
private List<LazyClassGen>
public String
public ConstantPool
public InstructionFactory
public String
public List<BcelField>
public String
public String[]
public String
public String
public JavaClass
public byte[]
public LazyMethodGen
public LazyMethodGen
getLazyMethodGen(String name, String signature)

public LazyMethodGen
getLazyMethodGen(String name, String signature, boolean allowMissing)

public int
public List<LazyMethodGen>
public int
public String
public String
public WeaverStateInfo
getOrCreateWeaverStateInfo(boolean inReweavableMode)

public String
getPackageName()

Returns the packagename - if its the default package we return an empty string

pack-priv int
public LazyMethodGen
public ResolvedType
public Field
getTjpField(BcelShadow shadow, final boolean isEnclosingJp)

public ResolvedType
public World
public boolean
public static boolean
private static boolean
private boolean
private boolean
private InstructionList[]
private void
private void
initializeTjpOptimal(InstructionFactory fact, InstructionList list, Field field, BcelShadow shadow)

Generate optimal joinpoint initialization code.

private InstructionList
public boolean
public boolean
private boolean
public boolean
public boolean
public boolean
protected String
protected String
makeString(int i)

protected String
protected String
protected String
makeString(String[] names)

private void
private void
private void
private void
private final void
pushInt(InstructionList list, int value)

private final void
private void
public boolean
private void
private static int
public void
setMajorMinor(int major, int minor)

public void
setSuperClass(ResolvedType newSuperclass)

public String
public String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
public void
warnOnAddedMethod(Method method, ISourceLocation sourceLocation)

public void
public void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait