serp.bytecode
public class SourceFile extends Attribute
Modifier and Type | Method and Description |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a
BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
java.io.File |
getFile(java.io.File dir)
Return the file object for the source file, or null if not set.
|
int |
getFileIndex()
Return the index into the class
ConstantPool of the
UTF8Entry naming the source file for this class, or 0 if not set. |
java.lang.String |
getFileName()
Return the name of the source file, or null if not set.
|
void |
setFile(java.io.File file)
Set the source file.
|
void |
setFile(java.lang.String name)
Set the name of the source file.
|
void |
setFileIndex(int sourceFileIndex)
Set the index into the class
ConstantPool of the
UTF8Entry naming the source file for this class. |
void |
setFromClassName()
Set the file name from the current class name plus the .java extension.
|
getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, isValid
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes
public int getFileIndex()
ConstantPool
of the
UTF8Entry
naming the source file for this class, or 0 if not set.public void setFileIndex(int sourceFileIndex)
ConstantPool
of the
UTF8Entry
naming the source file for this class.public java.lang.String getFileName()
public java.io.File getFile(java.io.File dir)
dir
- the directory of the file, or nullpublic void setFile(java.lang.String name)
public void setFile(java.io.File file)
public void setFromClassName()
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.