All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----harpoon.ClassFile.Raw.Attribute.Attribute | +----harpoon.ClassFile.Raw.Attribute.AttributeSourceFile
SourceFile
attribute is an optional fixed-length
attribute in the attributes
table of the
ClassFile
structure. There can be no more than one
SourceFile
attribute in the attributes
table of a given ClassFile
structure.
Only the name of the source file is given by the
SourceFile
attribute. It never represents tha name of a
directory containing the file or an absolute path name for the file.
For instance, the SourceFile
attribute might contain the
file name foo.java
but not the UNIX pathname
/home/lindholm/foo.java
.
sourcefile_index
item must be a
valid index into the constant_pool
table.
attribute_length
item indicates
the length of the attribute, excluding the initial six bytes.
public int sourcefile_index
sourcefile_index
item must be a
valid index into the constant_pool
table. The
constant pool entry at that index must be a
CONSTANT_Utf8_info
structure representing the
string giving the name of the source file from which this
class
file was compiled.
public AttributeSourceFile(ClassFile parent, int attribute_name_index, int sourcefile_index)
public long attribute_length()
attribute_length
item indicates
the length of the attribute, excluding the initial six bytes.
public ConstantUtf8 sourcefile_index()
public String sourcefile()
public void write(ClassDataOutputStream out) throws IOException
public void print(PrintWriter pw, int indent)
All Packages Class Hierarchy This Package Previous Next Index