JML

org.multijava.util.classfile
Class AnnotElementValue

java.lang.Object
  extended byorg.multijava.util.classfile.AnnotElementValue
Direct Known Subclasses:
AnnotBooleanElementValue, AnnotByteElementValue, AnnotCharElementValue, AnnotDoubleElementValue, AnnotFloatElementValue, AnnotIntegerElementValue, AnnotLongElementValue, AnnotShortElementValue, AnnotStringElementValue

public abstract class AnnotElementValue
extends Object

A class representing a value in an element-value pair of an annotation structure. This serves as the abstract super class of all value classes.

Author:
AHS
See Also:
Annotation, Annotation.ElementValuePair

Constructor Summary
AnnotElementValue()
           
 
Method Summary
(package private) abstract  int getSize()
          Return the size in bytes that this value takes up in the class file (not including the tag).
(package private) abstract  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool.
abstract  String toString()
          Return a textual representation of the value.
(package private) abstract  void write(ConstantPool cp, DataOutput out)
          Write this value to a classfile stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotElementValue

public AnnotElementValue()
Method Detail

resolveConstants

abstract void resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool.

Parameters:
cp - the constant pool for this class

write

abstract void write(ConstantPool cp,
                    DataOutput out)
             throws IOException
Write this value to a classfile stream.

Parameters:
cp - the constant pool
out - the output stream
Throws:
IOException - an IO error has occurred

getSize

abstract int getSize()
Return the size in bytes that this value takes up in the class file (not including the tag).


toString

public abstract String toString()
Return a textual representation of the value.

Overrides:
toString in class Object

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.