Class SourceFile
java.lang.Object
org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
org.fife.rsta.ac.java.classreader.attributes.SourceFile
The
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.- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intIndex into the constant pool of aConstantUtf8Infostructure representing the name of the source file from which this class file was compiled. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the source file that was compiled to create this class file.toString()Returns a string representation of this attribute.Methods inherited from class org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
getClassFile, getName, readUnsupportedAttribute
-
Field Details
-
sourceFileIndex
private int sourceFileIndexIndex into the constant pool of aConstantUtf8Infostructure representing the name of the source file from which this class file was compiled.
-
-
Constructor Details
-
SourceFile
Constructor.- Parameters:
cf- The class file.sourceFileIndex- Index into the constant pool of aConstantUtf8Infostructure representing the source file name.
-
-
Method Details
-
getSourceFileName
Returns the name of the source file that was compiled to create this class file.- Returns:
- The name of the source file.
-
toString
Returns a string representation of this attribute. Useful for debugging.
-