org.webmacro.directive
Class ArgsHolder
java.lang.Object
|
+--org.webmacro.directive.ArgsHolder
- All Implemented Interfaces:
- DirectiveArgs
- public final class ArgsHolder
- extends java.lang.Object
- implements DirectiveArgs
ArgsHolder is a container for directive arguments. The parser creates
and populates the ArgsHolder based on the contents of the directive
descriptor. The directive, in the build() method, will call the getArg()
methods to retrieve the arguments and build the directive.
- Author:
- Brian Goetz
Method Summary |
java.lang.Object |
getArg(int id)
Retrieve the argument whose id is the specified id. |
java.lang.Object |
getArg(int id,
BuildContext bc)
Retrieve the argument whose id is the specified id, and if it is a
Builder, build it with the specified build context. |
void |
setArg(int id,
java.lang.Object o)
Set the argument whose id is the specified id. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArgsHolder
public ArgsHolder(Directive.ArgDescriptor[] args)
getArg
public final java.lang.Object getArg(int id)
throws BuildException
- Retrieve the argument whose id is the specified id.
- Specified by:
getArg
in interface DirectiveArgs
getArg
public final java.lang.Object getArg(int id,
BuildContext bc)
throws BuildException
- Retrieve the argument whose id is the specified id, and if it is a
Builder, build it with the specified build context.
- Specified by:
getArg
in interface DirectiveArgs
setArg
public final void setArg(int id,
java.lang.Object o)
throws BuildException
- Set the argument whose id is the specified id. If the argument has
already been set, it is overwritten. Generally not used by directives,
only used by the parser.
- Specified by:
setArg
in interface DirectiveArgs