java.lang.Object
com.chaoswg.xtc4y.classdesc.Attribute
com.chaoswg.xtc4y.classdesc.SourceFileAttribute
- public class SourceFileAttribute
- extends Attribute
This class describes the information for a sourcefile attribute ($4.7.7)
|
Constructor Summary |
protected |
SourceFileAttribute(java.io.DataInputStream dis,
ConstantPool cp,
int length)
Creates a SourceFileAttribute and initializes it from a
DataInputStream
The attribute name and length
of the attribute information was already read. |
|
SourceFileAttribute(java.lang.String filename)
construct a new source file attribute with the filename as parameter
from the JVM book:
'the name of the source file from which this class file was compiled. |
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
filename
private java.lang.String filename
SourceFileAttribute
protected SourceFileAttribute(java.io.DataInputStream dis,
ConstantPool cp,
int length)
throws java.io.IOException
- Creates a SourceFileAttribute and initializes it from a
DataInputStream
The attribute name and length
of the attribute information was already read.
SourceFileAttribute
public SourceFileAttribute(java.lang.String filename)
- construct a new source file attribute with the filename as parameter
from the JVM book:
'the name of the source file from which this class file was compiled.
It will not be interpreted as indicating the name of a directory
containing the file or an absolute path name for the file; such
platform-specific additional information must be supplied by the
runtime interpreter or development tool at the time the file name is
actually used.'
writeAttribute
protected void writeAttribute(java.io.DataOutputStream dos,
ConstantPool cp)
throws java.io.IOException
- Write the attribute information onto the DataOutputStream, using the
constant pool to register variables. The Attribute name and the
length of the information will already be written. A specific
attribute implementation should overwrite this method.
- Specified by:
writeAttribute in class Attribute
getName
public java.lang.String getName()
- Specified by:
getName in class Attribute
setFileName
public void setFileName(java.lang.String filename)
- set the new source filename
getFileName
public java.lang.String getFileName()