import org.aspectj.weaver.bcel.asm.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.
+ * 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.
*/
public final class LazyClassGen {
}
/**
- * Returns the packagename - if its the default package we return an empty
- * string
+ * Returns the packagename - if its the default package we return an empty string
*/
public String getPackageName() {
if (packageName != null)
highestLineNumber = gen.highestLineNumber;
}
+ public boolean removeMethodGen(LazyMethodGen gen) {
+ return methodGens.remove(gen);
+ }
+
public void addMethodGen(LazyMethodGen gen, ISourceLocation sourceLocation) {
addMethodGen(gen);
if (!gen.getMethod().isPrivate()) {
myGen.addAnnotation(element);
}
// Attribute[] annAttributes =
- //org.aspectj.apache.bcel.classfile.Utility.getAnnotationAttributes(
+ // org.aspectj.apache.bcel.classfile.Utility.getAnnotationAttributes(
// getConstantPool(),annotations);
// for (int i = 0; i < annAttributes.length; i++) {
// Attribute attribute = annAttributes[i];
}
/**
- * When working with Java generics, a signature attribute is attached to the
- * type which indicates how it was declared. This routine ensures the
- * signature attribute for the class we are about to write out is correct.
- * Basically its responsibilities are:
+ * When working with Java generics, a signature attribute is attached to the type which indicates how it was declared. This
+ * routine ensures the signature attribute for the class we are about to write out is correct. Basically its responsibilities
+ * are:
* <ol>
* <li>
- * Checking whether the attribute needs changing (ie. did weaving change the
- * type hierarchy) - if it did, remove the old attribute
+ * Checking whether the attribute needs changing (ie. did weaving change the type hierarchy) - if it did, remove the old
+ * attribute
* <li>
- * Check if we need an attribute at all, are we generic? are our supertypes
- * parameterized/generic?
+ * Check if we need an attribute at all, are we generic? are our supertypes parameterized/generic?
* <li>
- * Build the new attribute which includes all typevariable, supertype and
- * superinterface information
+ * Build the new attribute which includes all typevariable, supertype and superinterface information
* </ol>
*/
private void fixupGenericSignatureAttribute() {
}
/**
- * Helper method to create a signature attribute based on a string
- * signature: e.g. "Ljava/lang/Object;LI<Ljava/lang/Double;>;"
+ * Helper method to create a signature attribute based on a string signature: e.g. "Ljava/lang/Object;LI<Ljava/lang/Double;>;"
*/
private Signature createSignatureAttribute(String signature) {
int nameIndex = cp.addUtf8("Signature");
// this test is like asking:
// if
- //(UnresolvedType.SERIALIZABLE.resolve(getType().getWorld()).isAssignableFrom
+ // (UnresolvedType.SERIALIZABLE.resolve(getType().getWorld()).isAssignableFrom
// (getType())) {
// only we don't do that because this forces us to find all the supertypes
// of the type,
}
/**
- * 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
+ * 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
*/
public String allocateField(String prefix) {
int highestAllocated = -1;