|
Sun Message Library for SWIFT API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stc.swift.runtime.SwiftOtdChild
public class SwiftOtdChild
SwiftOtdNode implementation.
Constructor Summary | |
---|---|
SwiftOtdChild(SwiftOtdRep parent,
java.lang.Class clazz)
Creates new SwiftOtdChild |
Method Summary | |
---|---|
java.lang.Object |
add()
Adds repitition to end of list. |
java.lang.Object |
add(int rep)
Adds/sets the given repitition. |
java.lang.Object |
append(byte[] data)
Append the given data to end of existing data. |
java.lang.Object |
append(int rep,
byte[] data)
Append the given data to end of existing data. |
java.lang.Object |
append(int rep,
int child,
byte[] data)
Append the given data to end of existing data. |
byte[] |
build(com.stc.otd.runtime.OtdOutputStream out)
Build (marshals, serializes, renders) the internal data tree into an output stream. |
java.lang.String[] |
check()
Validates the contents of the data tree. |
int |
choice()
For a choice node, returns the index of the valid child. |
boolean |
consumedDelim()
|
void |
consumedDelim(boolean consumedDelim)
|
boolean |
containsData()
|
void |
containsData(boolean constainsData)
|
java.lang.Object |
copy(int start,
byte[] data)
Copy the given data at specified point, overwrites existing data. |
java.lang.Object |
copy(int rep,
int start,
byte[] data)
Copy the given data at specified point, overwrites existing data. |
java.lang.Object |
copy(int rep,
int child,
int start,
byte[] data)
Copy the given data at specified point, overwrites existing data. |
int |
count()
Returns the number of repitition instances contained in this child. |
int |
count(int rep)
Returns the number of children instances contained in given repitition. |
boolean |
dataInRepititions()
|
void |
dataInRepititions(boolean dataInRepititions)
|
boolean |
dataP()
|
java.lang.Object |
delete(int start,
int unto)
Delete data from start til upto, shifting left remaining data. |
java.lang.Object |
delete(int rep,
int start,
int unto)
Delete data from start til upto, shifting left remaining data. |
java.lang.Object |
delete(int rep,
int child,
int start,
int unto)
Delete data from start til upto, shifting left remaining data. |
java.lang.Object |
get(int rep)
Retrieves the given repitition. |
java.lang.Object |
get(int rep,
int child)
Retrieves the given child repitition(default to 0). |
java.lang.String |
getPath()
Builds a printable representation to this object. |
java.lang.String |
getPath(SwiftOtdRep rep)
Builds a printable representation to this object. |
boolean |
has(int rep)
Tests whether the specified repetitiion is present. |
boolean |
has(int rep,
int child)
Tests whether given child of the specified repetitiion is present. |
java.lang.Object |
insert(int start,
byte[] data)
Inserts the given data at specified point, shifts existing data right. |
java.lang.Object |
insert(int rep,
int start,
byte[] data)
Inserts the given data at specified point, shifts existing data right. |
java.lang.Object |
insert(int rep,
int child,
int start,
byte[] data)
Inserts the given data at specified point, shifts existing data right. |
boolean |
isRequired()
|
int |
length()
Retrieves the length of the data for this object. |
java.util.Map |
mapOfReps()
|
void |
marshal(com.stc.otd.runtime.OtdOutputStream out)
Marshals (serializes, renders) the internal data tree into an output stream. |
com.stc.otd.runtime.OtdMeta |
meta()
Gets the run-time metadata for the root of the OTD's grammar. |
SwiftOtdRep |
parent()
|
java.lang.Object |
parse(com.stc.otd.runtime.OtdInputStream in)
Parse (unmarshals, deserializes, parses) the given input into an internal data tree. |
int |
print()
|
void |
printClear(int bitMask)
|
void |
printSet(int bitMask)
|
void |
remove(int rep)
Removes the given repitition. |
void |
remove(int rep,
int child)
Removes the given child repitition(default to 0). |
void |
resetRepititions()
|
void |
saveLastMatchPath(SwiftOtdRep rep)
|
void |
set(int rep,
int child,
java.lang.Object value)
Stores the given child instance. |
void |
set(int rep,
java.util.Map children)
Assigns the children to the specified repitition. |
void |
set(int rep,
java.lang.Object value)
Stores the given child instance. |
void |
set(java.util.Map reps)
Assigns the repititions as given in the map. |
void |
set(java.lang.Object data)
Assigns the data that represents this repitition as byte[]. |
int |
size()
Returns the current number of repititions for this child. |
int |
size(int rep)
Returns the number of children possible for given repitition. |
java.io.PrintStream |
trace()
|
void |
trace(java.io.PrintStream trace)
|
void |
unmarshal(byte[] bytes)
Unmarshals (deserializes, parses) the given input into an internal data tree. |
void |
updateParentInfo()
|
java.lang.String |
value()
Retrieves the data that represents the repititions of child. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwiftOtdChild(SwiftOtdRep parent, java.lang.Class clazz)
Method Detail |
---|
public void trace(java.io.PrintStream trace)
public java.io.PrintStream trace()
public int print()
public void printSet(int bitMask)
public void printClear(int bitMask)
public void saveLastMatchPath(SwiftOtdRep rep)
public boolean containsData()
public void containsData(boolean constainsData)
public boolean dataP()
public void consumedDelim(boolean consumedDelim)
public boolean consumedDelim()
public void dataInRepititions(boolean dataInRepititions)
public boolean dataInRepititions()
public void updateParentInfo()
public void resetRepititions()
public SwiftOtdRep parent()
public java.util.Map mapOfReps()
public boolean has(int rep) throws java.lang.IndexOutOfBoundsException
has
in interface com.stc.otd.runtime.OtdNode
rep
- repitition of this child, from 0
java.lang.IndexOutOfBoundsException
- for invalid reppublic boolean has(int rep, int child) throws java.lang.IndexOutOfBoundsException
has
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0child
- instance in repetition, from 0
java.lang.IndexOutOfBoundsException
- for invalid index or childpublic int size()
NONE
-
public int size(int rep)
size
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0
public int count()
NONE
-
public int choice()
choice
in interface com.stc.otd.runtime.OtdNode
NONE
-
public int count(int rep)
count
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0
public java.lang.String[] check()
public java.lang.String value()
NONE.
-
public int length()
NONE.
-
public java.lang.Object get(int rep) throws java.lang.IndexOutOfBoundsException
get
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0
java.lang.IndexOutOfBoundsException
- for invalid childpublic java.lang.Object get(int rep, int child) throws java.lang.IndexOutOfBoundsException
get
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0child
- instance in repetition, from 0
java.lang.IndexOutOfBoundsException
- for invalid index or childpublic void remove(int rep) throws java.lang.IndexOutOfBoundsException
remove
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0
java.lang.IndexOutOfBoundsException
- for invalid reppublic void remove(int rep, int child) throws java.lang.IndexOutOfBoundsException
remove
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0child
- instance in repetition, from 0
java.lang.IndexOutOfBoundsException
- for invalid index or childpublic void set(java.util.Map reps)
map
- containing the repititions to be assigned.public void set(int rep, java.util.Map children)
rep
- containing the children to be assigned.public void set(java.lang.Object data)
data
- byte[] that represents the repititions value.
java.lang.IllegalArgumentException
- for a type or value errorpublic void set(int rep, java.lang.Object value) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
set
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0value
- the new child value
java.lang.IndexOutOfBoundsException
- for invalid child
java.lang.IllegalArgumentException
- for a type or value errorpublic void set(int rep, int child, java.lang.Object value) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
set
in interface com.stc.otd.runtime.OtdNode
rep
- index of this child, from 0child
- instance in repetition, from 0value
- the new child value
java.lang.IndexOutOfBoundsException
- for invalid index or child
java.lang.IllegalArgumentException
- for a type or value errorpublic java.lang.Object add()
NONE
-
java.lang.IndexOutOfBoundsException
- for invalid child or reppublic java.lang.Object add(int rep)
rep
- index of this child, from 0
java.lang.IndexOutOfBoundsException
- for invalid child or reppublic java.lang.String getPath()
public java.lang.String getPath(SwiftOtdRep rep)
rep
- the repitition of this child.
public java.lang.Object insert(int start, byte[] data)
start
- byte of the insertion, from 0.data
- to be inserted.
public java.lang.Object insert(int rep, int start, byte[] data)
rep
- index of this child, from 0start
- byte of the insertion, from 0.data
- to be inserted.
public java.lang.Object insert(int rep, int child, int start, byte[] data)
rep
- index of this child, from 0child
- instance in repetition, from 0start
- byte of the insertion, from 0.data
- to be inserted.
public java.lang.Object copy(int start, byte[] data)
start
- byte of the copying, from 0.data
- to be copied.
public java.lang.Object copy(int rep, int start, byte[] data)
rep
- index of this child, from 0start
- byte of the copying, from 0.data
- to be copied.
public java.lang.Object copy(int rep, int child, int start, byte[] data)
rep
- index of this child, from 0child
- instance in repetition, from 0start
- byte of the copying, from 0.data
- to be copied.
public java.lang.Object append(byte[] data)
data
- to be appended.
public java.lang.Object append(int rep, byte[] data)
rep
- index of this child, from 0data
- to be appended.
public java.lang.Object append(int rep, int child, byte[] data)
rep
- index of this child, from 0.child
- instance in repetition, from 0.data
- to be appended.
public java.lang.Object delete(int start, int unto)
start
- byte of the deleting, from 0.upto
- byte of the deleting, from 0.
public java.lang.Object delete(int rep, int start, int unto)
rep
- index of this child, from 0start
- byte of the deleting, from 0.upto
- byte of the deleting, from 0.
public java.lang.Object delete(int rep, int child, int start, int unto)
rep
- index of this child, from 0child
- instance in repetition, from 0start
- byte of the deleting, from 0.upto
- byte of the deleting, from 0.
public com.stc.otd.runtime.OtdMeta meta()
meta
in interface com.stc.otd.runtime.OtdNode
public void marshal(com.stc.otd.runtime.OtdOutputStream out) throws com.stc.otd.runtime.MarshalException, java.io.IOException
out
- the stream to place the output to.
java.io.IOException
- ioexception
com.stc.otd.runtime.MarshalException
- for an inconsistent internal treepublic byte[] build(com.stc.otd.runtime.OtdOutputStream out) throws com.stc.otd.runtime.MarshalException, java.io.IOException
out
- the stream to place the output to.
java.io.IOException
- ioexception
com.stc.otd.runtime.MarshalException
- for an inconsistent internal treepublic void unmarshal(byte[] bytes) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
bytes
- the byte[] containing data for parsing.
java.io.IOException
- ioexception
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic java.lang.Object parse(com.stc.otd.runtime.OtdInputStream in) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
in
- the input, as a byte stream
java.io.IOException
- ioexception
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic boolean isRequired()
|
Sun Message Library for SWIFT API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |