JML

org.multijava.util.classfile
Class AnnotDoubleElementValue

java.lang.Object
  extended byorg.multijava.util.classfile.AnnotElementValue
      extended byorg.multijava.util.classfile.AnnotDoubleElementValue

public class AnnotDoubleElementValue
extends AnnotElementValue

A class representing a double value in an element-value pair of an annotation structure.

Author:
AHS
See Also:
Annotation.ElementValuePair

Field Summary
private  DoubleConstant value
          the constant pool entry for this value
 
Constructor Summary
AnnotDoubleElementValue(double value)
          Construct a new element-value with the given value.
AnnotDoubleElementValue(ConstantPool cp, DataInput in)
          Construct a new element-value from a classfile stream.
 
Method Summary
(package private)  int getSize()
          Return the size in bytes that this value takes up in the class file (not including the tag).
(package private)  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool.
 String toString()
          Return a textual representation of the value.
 double value()
          Return the encapsulated value.
(package private)  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
 

Field Detail

value

private DoubleConstant value
the constant pool entry for this value

Constructor Detail

AnnotDoubleElementValue

public AnnotDoubleElementValue(double value)
Construct a new element-value with the given value.


AnnotDoubleElementValue

public AnnotDoubleElementValue(ConstantPool cp,
                               DataInput in)
                        throws IOException
Construct a new element-value from a classfile stream.

Parameters:
cp - the constant pool
in - the input stream to read from
Throws:
IOException - an IO exception has occurred
Method Detail

resolveConstants

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

Parameters:
cp - the constant pool for this class

write

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

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


toString

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

Specified by:
toString in class AnnotElementValue

value

public double value()
Return the encapsulated value.


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.