diff options
Diffstat (limited to 'src/main/javassist/bytecode/annotation/CharMemberValue.java')
-rw-r--r-- | src/main/javassist/bytecode/annotation/CharMemberValue.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/javassist/bytecode/annotation/CharMemberValue.java b/src/main/javassist/bytecode/annotation/CharMemberValue.java index ce5d4199..bf8d7b44 100644 --- a/src/main/javassist/bytecode/annotation/CharMemberValue.java +++ b/src/main/javassist/bytecode/annotation/CharMemberValue.java @@ -16,11 +16,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; + /** * Char constant value. * @@ -59,11 +60,13 @@ public class CharMemberValue extends MemberValue { setValue('\0'); } + @Override Object getValue(ClassLoader cl, ClassPool cp, Method m) { return Character.valueOf(getValue()); } - Class getType(ClassLoader cl) { + @Override + Class<?> getType(ClassLoader cl) { return char.class; } @@ -84,6 +87,7 @@ public class CharMemberValue extends MemberValue { /** * Obtains the string representation of this object. */ + @Override public String toString() { return Character.toString(getValue()); } @@ -91,6 +95,7 @@ public class CharMemberValue extends MemberValue { /** * Writes the value. */ + @Override public void write(AnnotationsWriter writer) throws IOException { writer.constValueIndex(getValue()); } @@ -98,6 +103,7 @@ public class CharMemberValue extends MemberValue { /** * Accepts a visitor. */ + @Override public void accept(MemberValueVisitor visitor) { visitor.visitCharMemberValue(this); } |