|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.finra.jtaf.core.model.invocationtarget.InvocationTarget
public abstract class InvocationTarget
Common base class for any form of invocation target. TODO: Throw an exception if a parameter has already been defined?
Field Summary | |
---|---|
protected static Map<String,Object> |
globalContext
|
Constructor Summary | |
---|---|
InvocationTarget(String name)
This is called when the InvocationTarget is instantiated by the interpreter. |
Method Summary | |
---|---|
abstract void |
acceptInvocationTargetVisitor(Interpreter v)
This is used by the interpreter to either execute the command or the function. |
void |
addOptionalParameter(String name)
Add a new value as an optional parameter. |
void |
addProduction(String name)
Add a new value to the production set. |
void |
addRequiredParameter(String name)
Add a new value as a required parameter. |
protected static void |
cleanGlobalContext()
Used to clear all values from the global context. |
Set<String> |
getAllParameters()
Get all of the parameters of this InvocationTarget. |
static Object |
getFromGlobalContext(String key)
Used to get an object from the global context that is associated with the passed in key. |
protected static Map<String,Object> |
getGlobalContext()
|
String |
getName()
Get the name of this InvocationTarget |
Set<String> |
getOptionalParameters()
Get all of the registered optional parameters of this InvocationTarget. |
Set<String> |
getProductions()
Get all of the productions of this InvocationTarget. |
Set<String> |
getRequiredParameters()
Get all of the required parameters of this InvocationTarget |
String |
getUsage()
Get the usage of this InvocationTarget |
protected static void |
putToGlobalContext(String key,
Object value)
Used to add values to the global context of the command. |
protected static void |
setGlobalContext(Map<String,Object> contextGlobal)
Used to set global context to be used by the command. |
void |
setUsage(String usage)
Set the usage of this InvocationTarget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Map<String,Object> globalContext
Constructor Detail |
---|
public InvocationTarget(String name) throws NameFormatException
name
- - name of the invocation target.
NameFormatException
Method Detail |
---|
protected static Map<String,Object> getGlobalContext()
protected static void setGlobalContext(Map<String,Object> contextGlobal)
contextGlobal
- - The map to be used as the global context.protected static void putToGlobalContext(String key, Object value)
key
- - the key to be used in the map.value
- - the value to be stored in the context.public static Object getFromGlobalContext(String key)
key
- - the key associated with the value in the global context
protected static void cleanGlobalContext()
public final String getName()
public final String getUsage()
public final void setUsage(String usage)
usage
- - the new value for this InvocationTargets usagepublic final Set<String> getRequiredParameters()
public final void addRequiredParameter(String name)
name
- - the name to be used for this required parameter.public final Set<String> getOptionalParameters()
public final void addOptionalParameter(String name)
name
- - the name to be used for this optional parameter.public final Set<String> getAllParameters()
public final Set<String> getProductions()
public final void addProduction(String name)
name
- - the name to be used for this production.public abstract void acceptInvocationTargetVisitor(Interpreter v) throws Throwable
v
- - The interpreter that is executing this InvocationTarget.
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |