org.fife.rsta.ac.java.classreader.attributes
Class SourceFile
java.lang.Object
org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
org.fife.rsta.ac.java.classreader.attributes.SourceFile
public class SourceFile
- extends AttributeInfo
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
- Author:
- Robert Futrell
|
Method Summary |
String |
getSourceFileName()
Returns the name of the source file that was compiled to create this
class file. |
String |
toString()
Returns a string representation of this attribute. |
SourceFile
public SourceFile(ClassFile cf,
int sourceFileIndex)
- Constructor.
- Parameters:
cf - The class file.sourceFileIndex - Index into the constant pool of a
ConstantUtf8Info structure representing the source file
name.
getSourceFileName
public String getSourceFileName()
- Returns the name of the source file that was compiled to create this
class file.
- Returns:
- The name of the source file.
toString
public String toString()
- Returns a string representation of this attribute. Useful for
debugging.
- Overrides:
toString in class Object
- Returns:
- A string representation of this attribute.
Copyright © 2003-2011. All Rights Reserved.