public class SourceFile extends AttributeInfo
SourceFile attribute, an optional fixed-length attribute
in the attributes table of a ClassFile. There can be no more than
one SourceFile attribute for a given ClassFile.attributeNameIndex| Constructor and Description |
|---|
SourceFile(ClassFile cf,
int sourceFileIndex)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getSourceFileName()
Returns the name of the source file that was compiled to create this
class file.
|
java.lang.String |
toString()
Returns a string representation of this attribute.
|
getClassFile, getName, readUnsupportedAttributepublic SourceFile(ClassFile cf, int sourceFileIndex)
cf - The class file.sourceFileIndex - Index into the constant pool of a
ConstantUtf8Info structure representing the source file
name.public java.lang.String getSourceFileName()
public java.lang.String toString()
toString in class java.lang.Object