|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--openjava.ptree.ParseTreeObject | +--openjava.ptree.List | +--openjava.ptree.ArrayInitializer
The ArrayInitializer class presents initializer list of array elements.
ParseTree
,
List
,
VariableInitializer
Fields inherited from class openjava.ptree.ParseTreeObject |
debugFlag,
debugLevel,
LN,
out,
writerStack |
Constructor Summary | |
ArrayInitializer()
Allocates a new ArrayInitializer. |
|
ArrayInitializer(ExpressionList exprs)
|
|
ArrayInitializer(VariableInitializer vi)
|
Method Summary | |
void |
accept(ParseTreeVisitor v)
Accepts a ParseTreeVisitor object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern. |
void |
add(VariableInitializer p)
Adds the specified element after the list This causes side-effect. |
void |
addAll(ArrayInitializer lst)
Appends a list after this list. |
VariableInitializer |
get(int n)
Gets the specified element at the index. |
void |
insertElementAt(VariableInitializer p,
int n)
Inserts the specified element into the list before the specified element of the list. |
boolean |
isRemainderOmitted()
|
void |
omitRemainder()
|
void |
omitRemainder(boolean is_omitted)
|
VariableInitializer |
remove(int index)
Removes the element at the specified position in this Vector. |
void |
set(int index,
VariableInitializer p)
Adds the specified element after the list This causes side-effect. |
ArrayInitializer |
subList(int from_index,
int to_index)
Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive. |
void |
writeCode()
Writes the code this parse-tree presents for. |
Methods inherited from class openjava.ptree.List |
childrenAccept,
contains,
contents_addElement,
contents_elementAt,
contents_insertElementAt,
contents_removeElementAt,
contents_setElementAt,
contents_size,
elements,
equals,
isEmpty,
makeRecursiveCopy,
removeAll,
replaceChildWith,
size |
Methods inherited from class openjava.ptree.ParseTreeObject |
clone,
eq,
eq,
equal,
flushPrintWriter,
getDebugFlag,
getNest,
getObjectID,
getParent,
getPrintWriter,
getTab,
hashCode,
lastObjectID,
makeCopy,
popNest,
popPrintWriter,
pushNest,
pushPrintWriter,
replace,
setDebugFlag,
setDebugLevel,
setNest,
setParent,
setPrintStream,
setTab,
toFlattenString,
toString,
writeDebug,
writeDebugL,
writeDebugLln,
writeDebugln,
writeDebugLR,
writeDebugR,
writeDebugRln,
writeTab |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ArrayInitializer()
arrayinit
- prototype objectpublic ArrayInitializer(VariableInitializer vi)
public ArrayInitializer(ExpressionList exprs)
Method Detail |
public void writeCode()
public void omitRemainder(boolean is_omitted)
public void omitRemainder()
public boolean isRemainderOmitted()
public VariableInitializer get(int n)
n
- indexpublic void add(VariableInitializer p)
p
- VariableInitializer to be inserted into the listpublic void set(int index, VariableInitializer p)
p
- VariableInitializer to be inserted into the listpublic VariableInitializer remove(int index)
index
- the index of the element to removed.public void insertElementAt(VariableInitializer p, int n)
p
- the element to be inserted into the listn
- number of the element before which insertion ocuurspublic void addAll(ArrayInitializer lst)
lst
- a list to be appendedpublic ArrayInitializer subList(int from_index, int to_index)
fromIndex
- low endpoint (inclusive) of the subList.toKey
- high endpoint (exclusive) of the subList.public void accept(ParseTreeVisitor v) throws ParseTreeException
ParseTreeVisitor
object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern.
This invoke an appropriate visit()
method on the
accepted visitor.
visitor
- a visitor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |