Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.chaoswg.xtc4y.classdesc
Class SourceFileAttribute  view SourceFileAttribute download SourceFileAttribute.java

java.lang.Object
  extended bycom.chaoswg.xtc4y.classdesc.Attribute
      extended bycom.chaoswg.xtc4y.classdesc.SourceFileAttribute

public class SourceFileAttribute
extends Attribute

This class describes the information for a sourcefile attribute ($4.7.7)


Field Summary
private  java.lang.String filename
           
static java.lang.String NAME
           
 
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.
 
Method Summary
 java.lang.String getFileName()
           
 java.lang.String getName()
           
 void setFileName(java.lang.String filename)
          set the new source filename
protected  void writeAttribute(java.io.DataOutputStream dos, ConstantPool cp)
          Write the attribute information onto the DataOutputStream, using the constant pool to register variables.
 
Methods inherited from class com.chaoswg.xtc4y.classdesc.Attribute
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

filename

private java.lang.String filename
Constructor Detail

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.'

Method Detail

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()