attr
Class srcFileAttr
java.lang.Object
|
+--util.dataRead
|
+--attr.attrInfo
|
+--attr.srcFileAttr
- public class srcFileAttr
- extends attrInfo
This object represents the source file attribute. The structure of
this attribute is:
SourceFile_attribute {
u2 attribute_name_index;
u4 attribute_length;
u2 sourcefile_index;
}
The attribute_name_index and attribute length are read by the
attrFactory.allocAttr method. These values are passed into the class
constructor.
The sourcefile_index points to a constUtf8 object in the constant
pool. This object contains the file name for the object. There
can be no more than one SourceFile attribute in the attributes
table of a given ClassFile structure.
- Author:
- Ian Kaplan
Constructor Summary |
srcFileAttr(java.lang.String name,
int length,
java.io.DataInputStream dStream,
constPool constPoolSec)
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
srcFile
private constUtf8 srcFile
srcFileAttr
public srcFileAttr(java.lang.String name,
int length,
java.io.DataInputStream dStream,
constPool constPoolSec)
getFileName
public java.lang.String getFileName()
- Returns:
- a String object for the source file name
pr
public void pr()
- Overrides:
- pr in class attrInfo