public abstract class KeywordBase extends Object implements IKeyword
IKeyword
interface.
This class provides utility to execute the keywords using the Java reflection api.
Extend this class if you want your methods to be used as keywords.
Modifier | Constructor and Description |
---|---|
protected |
KeywordBase() |
Modifier and Type | Method and Description |
---|---|
void |
execute(String keyword,
Object[] args)
Executes the specified keyword with specified given arguments.
|
protected void |
initialize(Object obj)
Initializes the class to collect the information of the methods available in the said class.
|
boolean |
isSupported(String methodName,
Object[] args)
Verifies whether the said keyword with the arguments is supported by the implementing class or not.
|
protected void initialize(Object obj)
obj
- Object of the class whose method you to use for keyword execution.public boolean isSupported(String methodName, Object[] args)
IKeyword
isSupported
in interface IKeyword
methodName
- Keyword that needs to be executedargs
- Arguments that needs to be used to execute the said keywordtrue
or false
depending upon the condition whether the "keyword"
with specified no. of arguments is supported or not.Copyright © 2014. All rights reserved.