aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/annotation/CharMemberValue.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/bytecode/annotation/CharMemberValue.java')
-rw-r--r--src/main/javassist/bytecode/annotation/CharMemberValue.java47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/annotation/CharMemberValue.java b/src/main/javassist/bytecode/annotation/CharMemberValue.java
new file mode 100644
index 00000000..9d9eb17f
--- /dev/null
+++ b/src/main/javassist/bytecode/annotation/CharMemberValue.java
@@ -0,0 +1,47 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package javassist.bytecode.annotation;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ *
+ **/
+public class CharMemberValue extends MemberValue
+{
+ short const_value_index;
+
+ public CharMemberValue(short cvi)
+ {
+ tag = 'C';
+ this.const_value_index = cvi;
+ }
+
+ public char getValue()
+ {
+ return (char)cp.getIntegerInfo(const_value_index);
+ }
+ public void setValue(char newVal)
+ {
+ const_value_index = (short)cp.addIntegerInfo(newVal);
+ }
+
+ public String toString()
+ {
+ return "" + getValue();
+ }
+ public void write(DataOutputStream dos) throws IOException
+ {
+ super.write(dos);
+ dos.writeShort(const_value_index);
+ }
+}