|
JACK 5.4 JACOB Application Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaos.apib.JacobReader
The JacobReader class is used to read in JACOB objects defined either
in a file or a String
and translate them into
Base
Objects. It requires a
TypeDict
to define the various objects it
can read in.
Constructor Summary | |
JacobReader(TypeDict d)
Constructs a new JacobReader , given the
TypeDict , which defines the Jacob Objects
that can be read. |
Method Summary | |
static void |
initialize(java.lang.String s)
A helper method which is equvalent to calling the initialize method on the
TypeDict defined in this
JacobReader . |
static Base |
read(java.lang.String s)
This method is used to call the readFromString method on this class,
checking first that the JacobReader has been enabled
via the setEnabled method. |
Base |
readFromFile(java.lang.String f)
Reads a single Jacob object from a text file and returns the Base representation of this object. |
Base |
readFromString(java.lang.String s)
Reads a single Jacob object from a String and returns the
Base representation of this object. |
static void |
setDict(TypeDict d)
Sets the TypeDict for this JacobReader,
which defines the Jacob Objects that can be read. |
static boolean |
setEnabled(boolean b)
Sets whether this JacobReader is able to read. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JacobReader(TypeDict d)
JacobReader
, given the
TypeDict
, which defines the Jacob Objects
that can be read.
d
- the TypeDict
which defines
Jacob Objects that can be read.Method Detail |
public static void setDict(TypeDict d)
TypeDict
for this JacobReader,
which defines the Jacob Objects that can be read.
d
- the TypeDict
which defines
Jacob Objects that can be read.public static void initialize(java.lang.String s)
initialize
method on the
TypeDict
defined in this
JacobReader
.
s
- a String
of
Initializer
class names separated by a ":" character.initialize
,
initialize
public static Base read(java.lang.String s)
readFromString
method on this class,
checking first that the JacobReader
has been enabled
via the setEnabled
method.
s
- a String
containing a Jacob Object to be read
and converted to a Base Object.public static boolean setEnabled(boolean b)
JacobReader
is able to read. When set to
false, the read
method will return null. The
function of the readFromString
and
readFromFile
methods are not affected by
setting this variable.
b
- whether this JacobReader
is enabled.public Base readFromString(java.lang.String s)
String
and returns the
Base
representation of this object. If the
String
contains more than one Jacob object, only
the first object will be read.
s
- a String
containing a Jacob Object to be read
and converted to a Base Object.public Base readFromFile(java.lang.String f)
Base
representation of this object. If the file
contains more than one Jacob object, only the first object will be read.
|
JACK 5.4 JACOB Application Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.