|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.webmacro.directive.DirectiveBuilder
DirectiveBuilder manages the building of directives. It is created by the parser, which populates it with the directive arguments, and the DirectiveBuilder.build() method calls the build() method for the appropriate directive.
Constructor Summary | |
DirectiveBuilder(DirectiveDescriptor desc)
|
Method Summary | |
java.lang.Object |
build(BuildContext bc)
Build the directive. |
java.lang.Object |
getArg(int argId)
Retrieve the argument whose id is the specified id. |
java.lang.Object |
getArg(int argId,
BuildContext bc)
Retrieve the argument whose id is the specified id, and if it is a Builder, build it with the specified build context. |
java.lang.String |
getName()
Get the name this directive was registered as |
ArgsHolder[] |
getRepeatingSubdirective(int subdId)
Retrieves an array of ArgsHolders for the associated subdirective so that the subdirective arguments can be retrieved. |
ArgsHolder |
getSubdirective(int subdId)
Retrieves the ArgsHolder for the associated subdirective so that the subdirective arguments can be retrieved. |
int |
getSubdirectiveCount(int subdId)
Find out how many subdirectives of the specified id were present. |
DirectiveArgs |
newSubdirective(int subdId)
Create a new subdirective of the specified id and create an ArgsHolder for its arguments. |
void |
setArg(int argId,
java.lang.Object arg)
Set the argument whose id is the specified id. |
boolean |
subdirectiveOk(int subdId)
Check to see if the specified subdirective is OK at this point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DirectiveBuilder(DirectiveDescriptor desc)
Method Detail |
public java.lang.Object getArg(int argId) throws BuildException
getArg
in interface DirectiveArgs
public java.lang.Object getArg(int argId, BuildContext bc) throws BuildException
getArg
in interface DirectiveArgs
public int getSubdirectiveCount(int subdId) throws BuildException
public void setArg(int argId, java.lang.Object arg) throws BuildException
setArg
in interface DirectiveArgs
public DirectiveArgs newSubdirective(int subdId) throws BuildException
public boolean subdirectiveOk(int subdId) throws BuildException
public ArgsHolder getSubdirective(int subdId) throws BuildException
public ArgsHolder[] getRepeatingSubdirective(int subdId) throws BuildException
public java.lang.Object build(BuildContext bc) throws BuildException
build
in interface Builder
public java.lang.String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |