|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.base.ProgramUnit
public class ProgramUnit
Encapsulates information about a set of classes constituting a portion of a program. Typically used to identify classes contained in jar files and/or specified in 'prog' files.
Field Summary | |
---|---|
java.util.List |
classes
The classes associated with this program unit. |
boolean |
isJar
Flag specifying whether the location field points to a jar file. |
java.lang.String |
location
The location where class files associated with this program unit can be found. |
boolean |
useLocation
Flag specifying whether the location field should be considered valid. |
Constructor Summary | |
---|---|
ProgramUnit()
Creates a default program unit. |
|
ProgramUnit(java.lang.String location)
Creates a program unit to specify classes at a specific location. |
|
ProgramUnit(java.lang.String location,
boolean useLocation,
boolean isJar,
java.util.List classes)
Creates a program unit to specify classes at a specific location with particular characteristics. |
Method Summary | |
---|---|
void |
addClass(java.lang.String className)
Adds a class to this program unit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.lang.String location
public final java.util.List classes
public final boolean useLocation
false
, tools should assume that entries
in the class list may already include path information.
public final boolean isJar
Constructor Detail |
---|
public ProgramUnit()
The location
field will be null
,
the useLocation
field set to false
,
and the isJar
field set to false
.
This constructor is typically used to create a "default" program unit which contains the class names specified as arguments to a tool. Some tools prefer to process such entries directly and should be able to accommodate entries which already have associated path information.
public ProgramUnit(java.lang.String location)
The isJar
field is automatically set by parsing
the provided location field. The location
field is
always set to true
by this constructor.
location
- Name of the directory or jar file which constitutes
this program unit.public ProgramUnit(java.lang.String location, boolean useLocation, boolean isJar, java.util.List classes)
This constructor is primarily intended to be used for deserialization.
location
- Name of the directory or jar file which constitutes
this program unit.useLocation
- Flag specifying whether the location should be
considered valid.isJar
- Flag specifying whether the location points to a
jar file.classes
- List of classes constituting the program unit.Method Detail |
---|
public void addClass(java.lang.String className)
className
- Name of the class to be added to this program unit.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |