at.dms.classfile
Class SourceFileAttribute

java.lang.Object
  |
  +--at.dms.classfile.Attribute
        |
        +--at.dms.classfile.SourceFileAttribute

public class SourceFileAttribute
extends Attribute

Source File Attribute: VMS 4.7.2. This attribute represents the name of the source file from which this class file was compiled.


Fields inherited from class at.dms.classfile.Attribute
EMPTY
 
Constructor Summary
SourceFileAttribute(java.io.DataInput in, ConstantPool cp)
          Constructs a source file attribute from a class file stream.
SourceFileAttribute(java.lang.String name)
          Create a source file attribute.
 
Method Summary
(package private)  int getSize()
          Returns the space in bytes used by this attribute in the classfile
(package private)  int getTag()
          Returns the attribute's tag
(package private)  java.lang.String getValue()
          Return the name of the source file
(package private)  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool.
(package private)  void write(ConstantPool cp, java.io.DataOutput out)
          Write this class into the the file (out) getting data position from the constant pool.
 
Methods inherited from class at.dms.classfile.Attribute
read, readCodeInfoAttribute, readInterfaceOnly
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceFileAttribute

public SourceFileAttribute(java.lang.String name)
Create a source file attribute.
Parameters:
name - The name of the source file.

SourceFileAttribute

public SourceFileAttribute(java.io.DataInput in,
                           ConstantPool cp)
                    throws java.io.IOException,
                           ClassFileFormatException
Constructs a source file attribute from a class file stream.
Parameters:
in - The stream to read from.
cp - The constant pool.
Throws:
java.io.IOException - An io problem has occured.
ClassFileFormatException - Attempt to write a bad classfile info.
Method Detail

getTag

int getTag()
Returns the attribute's tag
Overrides:
getTag in class Attribute

getSize

int getSize()
Returns the space in bytes used by this attribute in the classfile
Overrides:
getSize in class Attribute

getValue

java.lang.String getValue()
Return the name of the source file

resolveConstants

void resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool.
Overrides:
resolveConstants in class Attribute
Parameters:
cp - The constant pool for this class.

write

void write(ConstantPool cp,
           java.io.DataOutput out)
     throws java.io.IOException
Write this class into the the file (out) getting data position from the constant pool.
Overrides:
write in class Attribute
Parameters:
cp - The constant pool that contain all data.
out - The file where to write this object info.
Throws:
java.io.IOException - An io problem has occured.