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. |
File |
getFile(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. |
String |
getFileName()
Return the name of the source file, or null if not set.
|
void |
setFile(File file)
Set the source file.
|
void |
setFile(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, isValidaddAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributespublic 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 String getFileName()
public File getFile(File dir)
dir - the directory of the file, or nullpublic void setFile(String name)
public void setFile(File file)
public void setFromClassName()
public void acceptVisit(BCVisitor visit)
VisitAcceptorBCVisitor, 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.Copyright © 2002–2015. All rights reserved.