diff options
Diffstat (limited to 'bcel-builder/src/org/aspectj/apache/bcel/generic/annotation/ClassElementValueGen.java')
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/annotation/ClassElementValueGen.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/annotation/ClassElementValueGen.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/annotation/ClassElementValueGen.java index 5241fd353..b1d11ad74 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/annotation/ClassElementValueGen.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/annotation/ClassElementValueGen.java @@ -17,6 +17,7 @@ import java.io.IOException; import org.aspectj.apache.bcel.classfile.ConstantUtf8; import org.aspectj.apache.bcel.classfile.annotation.ClassElementValue; +import org.aspectj.apache.bcel.classfile.annotation.ElementValue; import org.aspectj.apache.bcel.generic.ConstantPoolGen; import org.aspectj.apache.bcel.generic.ObjectType; @@ -37,6 +38,13 @@ public class ClassElementValueGen extends ElementValueGen { //this.idx = cpool.addClass(t); idx = cpool.addUtf8(t.getSignature()); } + + /** + * Return immutable variant of this ClassElementValueGen + */ + public ElementValue getElementValue() { + return new ClassElementValue(type,idx,cpGen.getConstantPool()); + } public ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool,boolean copyPoolEntries) { super(CLASS,cpool); |