JML

org.multijava.util.classfile
Class UniverseFieldAttribute

java.lang.Object
  extended byorg.multijava.util.classfile.Attribute
      extended byorg.multijava.util.classfile.UniverseFieldAttribute

public class UniverseFieldAttribute
extends Attribute

This class implements a JUTS field attribute. It is basically just a wrapper for one byte that describes the universe type modifier for a field of reference or array type. The format of the attribute (not including the standard initial six bytes): - the one and only byte is the encoded universe type modifier for this field This attribute is recognized by UniverseAttributeParser. VMS 4.7.1: The attribute's name is org.multijava.universe_field

Author:
AHS
See Also:
UniverseAttributeParser

Field Summary
private static AsciiConstant attr
           
private  byte byteConstant
          the byte holding the encoded universe type modifier
(package private) static String tagString
          the attribute's name
 
Constructor Summary
UniverseFieldAttribute(byte byteConstant)
          Create a universe field attribute for an encoded universe type modifier.
UniverseFieldAttribute(DataInput in, ConstantPool cp)
          Constructs a universe field attribute from a class file stream.
 
Method Summary
 byte getByteConstant()
          Return the universe of the reference type.
protected  int getSize()
          Returns the space in bytes used by this attribute in the classfile.
protected  int getTag()
          Returns the attribute's tag.
protected  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool.
protected  void write(ConstantPool cp, DataOutput out)
          Write this class into the the file (out) getting data position from the constant pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tagString

static final String tagString
the attribute's name


attr

private static AsciiConstant attr

byteConstant

private byte byteConstant
the byte holding the encoded universe type modifier

Constructor Detail

UniverseFieldAttribute

public UniverseFieldAttribute(byte byteConstant)
Create a universe field attribute for an encoded universe type modifier.

Parameters:
byteConstant - the encoded universe type modifier

UniverseFieldAttribute

public UniverseFieldAttribute(DataInput in,
                              ConstantPool cp)
                       throws IOException,
                              ClassFileFormatException
Constructs a universe field attribute from a class file stream.

Parameters:
in - the stream to read from
cp - the constant pool
Throws:
IOException - an IO problem has occurred
ClassFileFormatException - the classfile is malformed
Method Detail

getTag

protected int getTag()
Returns the attribute's tag.


getSize

protected int getSize()
Returns the space in bytes used by this attribute in the classfile.


getByteConstant

public byte getByteConstant()
Return the universe of the reference type.

See Also:
byteConstant

resolveConstants

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

Parameters:
cp - the constant pool for this class

write

protected void write(ConstantPool cp,
                     DataOutput out)
              throws IOException
Write this class into the the file (out) getting data position from the constant pool.

Parameters:
cp - the constant pool that contain all data
out - the file where to write this object info
Throws:
IOException - an io problem has occured

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.