|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--abbot.script.Step | +--abbot.script.Call
Class for script steps that want to invoke a method on a class. Subclasses may override getMethod and getTarget to customize behavior.
<call method="..." args="..." class="...">
Fields inherited from interface abbot.script.Tags |
TAG_ACTION, TAG_ARGS, TAG_ASSERT, TAG_AWTTESTSCRIPT, TAG_CALL, TAG_CLASS, TAG_CLASSPATH, TAG_COMMENT, TAG_COMPONENT, TAG_COUNT, TAG_DELEGATE, TAG_DESC, TAG_DOCBASE, TAG_EVENT, TAG_FILENAME, TAG_FORKED, TAG_HEIGHT, TAG_HORDER, TAG_ID, TAG_INDEX, TAG_INVERT, TAG_INVOKER, TAG_KEYCHAR, TAG_KEYCODE, TAG_KIND, TAG_LAUNCH, TAG_METHOD, TAG_MODIFIERS, TAG_NAME, TAG_PARAMS, TAG_PARENT, TAG_POLL_INTERVAL, TAG_PROPERTY, TAG_SAMPLE, TAG_SCRIPT, TAG_SEQUENCE, TAG_SLOW, TAG_STOP_ON_ERROR, TAG_STOP_ON_FAILURE, TAG_TAG, TAG_TERMINATE, TAG_THREADED, TAG_TIMEOUT, TAG_TITLE, TAG_TRIGGER, TAG_TYPE, TAG_VALUE, TAG_VMARGS, TAG_VORDER, TAG_WAIT, TAG_WIDTH, TAG_WINDOW, TAG_X, TAG_Y |
Constructor Summary | |
Call(Resolver resolver,
Map attributes)
|
|
Call(Resolver resolver,
String description,
String className,
String methodName,
String[] args)
|
Method Summary | |
(package private) static String |
encode(String arg)
|
String[] |
getArgs()
Return the arguments as an array of String. |
Map |
getAttributes()
Attributes to save in script. |
protected String |
getDefaultDescription()
Return a reasonable default description for this script step. |
String |
getEncodedArguments()
Convert our argument vector into a single String. |
protected Method |
getMethod()
Return the method to be used for invocation. |
String |
getMethodName()
Method name to save in script. |
protected Object |
getTarget(Method m)
Return the target of the invocation. |
Class |
getTargetClass()
Get the class of the target of the method invocation. |
String |
getTargetClassName()
|
String |
getUsage()
Provide a usage String for this step. |
String |
getXMLTag()
Define the XML tag to use for this script step. |
protected Object |
invoke()
Deferred evaluation of arguments allows us to refer to components that don't necessarily exist when the script is read in. |
protected Method |
resolveMethod(String name,
Class cls,
Class returnType)
Look up the given method name in the given class. |
protected void |
runStep()
Implement the step's behavior here. |
void |
setArguments(String argList)
|
void |
setMethodName(String mn)
|
void |
setTargetClassName(String cn)
|
Methods inherited from class abbot.script.Step |
addAttributes, addContent, createAttributeMap, createStep, createStep, getDescription, getFinder, getResolver, parseStepAttributes, resolve, resolveClass, resolveTester, run, setDescription, setScriptError, simpleClassName, toEditableString, toString, toXML, toXMLString, usage, usage |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Call(Resolver resolver, Map attributes)
public Call(Resolver resolver, String description, String className, String methodName, String[] args)
Method Detail |
protected String getDefaultDescription()
Step
getDefaultDescription
in class Step
public String getUsage()
Step
getUsage
in class Step
public String getXMLTag()
Step
getXMLTag
in class Step
public String getEncodedArguments()
public void setArguments(String argList)
public void setMethodName(String mn)
public String getMethodName()
public String getTargetClassName()
public void setTargetClassName(String cn)
public Map getAttributes()
getAttributes
in class Step
public String[] getArgs()
protected void runStep() throws Throwable
Step
runStep
in class Step
protected Object invoke() throws Throwable
protected Method getMethod() throws InvalidScriptException
public Class getTargetClass() throws InvalidScriptException
protected Object getTarget(Method m) throws Throwable
protected Method resolveMethod(String name, Class cls, Class returnType)
static String encode(String arg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |