From 98d8a582fcc18228e5b776532ba522fa96a6b563 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 1 Nov 2005 16:30:37 +0000 Subject: [PATCH] helpers --- .../src/org/aspectj/weaver/bcel/LazyClassGen.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 04c88df8e..42c99ebe3 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -88,6 +88,7 @@ public final class LazyClassGen { private ClassGen myGen; private ConstantPoolGen constantPoolGen; private World world; + private String packageName = null; private List /*LazyMethodGen*/ methodGens = new ArrayList(); private List /*LazyClassGen*/ classGens = new ArrayList(); @@ -329,6 +330,14 @@ public final class LazyClassGen { return root; return new File(root, str.substring(0, index)); } + + public String getPackageName() { + if (packageName!=null) return packageName; + String str = getInternalClassName(); + int index= str.lastIndexOf("/"); + if (index==-1) return str; + return str.substring(0,index).replace('/','.'); + } public String getClassId() { String str = getInternalClassName(); @@ -351,6 +360,7 @@ public final class LazyClassGen { warnOnAddedMethod(gen.getMethod(),sourceLocation); } } + public void errorOnAddedField (Field field, ISourceLocation sourceLocation) { if (isSerializable && !hasSerialVersionUIDField) { @@ -632,6 +642,10 @@ public final class LazyClassGen { public String getSuperClassname() { return myGen.getSuperclassName(); } + + public String[] getInterfaceNames() { + return myGen.getInterfaceNames(); + } // non-recursive, may be a bug, ha ha. -- 2.39.5