org.eigenbase.xom
Constructor and Description |
---|
DefWalker(NodeDef[] defs)
Construct a DefWalker, attaching it to a NodeDef array and
specifying a PrintWriter to display error messages for later
consumption.
|
Modifier and Type | Method and Description |
---|---|
NodeDef |
expect(Class elemType)
Returns the next node in the defs array, but only if it matches
the provided class elemType.
|
NodeDef[] |
expectArray(Class elemType)
Returns a portion of the remaining nodes in the defs array as an
array.
|
Object |
expectTypeArray(Class elemType)
Returns a portion of the remaining nodes in the defs array as an
array.
|
public NodeDef expect(Class elemType) throws XOMException
elemType
- the Class of NodeDef to expect. This class will
always be assignable from the returned object.XOMException
- if there are no more nodes in the defs
array or if the next node is of an incorrect type.public NodeDef[] expectArray(Class elemType)
elemType
- the Class of NodeDef to expect and return. This
class will always be assignable from each returned object in the
array.public Object expectTypeArray(Class elemType)
elemType
- the Class of NodeDef to expect and return. This
class will always be assignable from each returned object in the
array.