| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.xom.DefWalker
public class DefWalker
DefWalker is a class designed to help users of plugin elements and elements with content type ANY. It walks through an array of ElementDef, searching for and returning portions as the correct types.

| Constructor Summary | |
|---|---|
DefWalker(NodeDef[] defs)
Construct a DefWalker, attaching it to a NodeDef array and specifying a PrintWriter to display error messages for later consumption.  | 
|
| Method Summary | |
|---|---|
 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.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DefWalker(NodeDef[] defs)
defs - a NodeDef array to walk.  All returned objects
 come from this array.| Method Detail | 
|---|
public NodeDef expect(Class elemType)
               throws XOMException
XOMException - if there are no more nodes in the defs
 array or if the next node is of an incorrect type.elemType - the Class of NodeDef to expect.  This class will
 always be assignable from the returned object.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.
  | 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||