diff options
Diffstat (limited to 'src/main/javassist/bytecode/annotation/AnnotationMemberValue.java')
-rw-r--r-- | src/main/javassist/bytecode/annotation/AnnotationMemberValue.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java b/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java index b1237114..7691e44f 100644 --- a/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java +++ b/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java @@ -15,11 +15,12 @@ */ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Nested annotation. * @@ -45,17 +46,18 @@ public class AnnotationMemberValue extends MemberValue { value = a; } + @Override Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); } - Class getType(ClassLoader cl) throws ClassNotFoundException { + @Override + Class<?> getType(ClassLoader cl) throws ClassNotFoundException { if (value == null) throw new ClassNotFoundException("no type specified"); - else - return loadClass(cl, value.getTypeName()); + return loadClass(cl, value.getTypeName()); } /** @@ -75,6 +77,7 @@ public class AnnotationMemberValue extends MemberValue { /** * Obtains the string representation of this object. */ + @Override public String toString() { return value.toString(); } @@ -82,6 +85,7 @@ public class AnnotationMemberValue extends MemberValue { /** * Writes the value. */ + @Override public void write(AnnotationsWriter writer) throws IOException { writer.annotationValue(); value.write(writer); @@ -90,6 +94,7 @@ public class AnnotationMemberValue extends MemberValue { /** * Accepts a visitor. */ + @Override public void accept(MemberValueVisitor visitor) { visitor.visitAnnotationMemberValue(this); } |