Package chemaxon.marvin.services
Class DynamicArgument<CT,RT>
java.lang.Object
chemaxon.marvin.services.ServiceArgument<RT>
chemaxon.marvin.services.DynamicArgument<CT,RT>
- Type Parameters:
CT
- the context typeRT
- the result type
ServiceArgument
s implementing this interface
should support automatic evaluation of arguments before service call
based on context.NOTE: subclasses MUST HAVE default constructor to use from Marvin Sketch
- Since:
- 5.6
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract RT
Evaluates the dynamic argument based on contextReturns the expression used for evaluationsReturns the value placeholder text.boolean
isValid()
Returnstrue
if service argument is validvoid
setExpression
(String expression) Sets the expressiontoString()
Methods inherited from class chemaxon.marvin.services.ServiceArgument
createArgument, createArgument, createArgumentAs, createArgumentAs, createConstantFromString, getAlias, getName, getType, getValue, setAlias, setName, setType, setValue
-
Constructor Details
-
DynamicArgument
protected DynamicArgument() -
DynamicArgument
-
-
Method Details
-
setExpression
Sets the expression- Parameters:
expression
- used for evaluation
-
getExpression
Returns the expression used for evaluations- Returns:
- the expression used for evaluations
-
evaluate
Evaluates the dynamic argument based on context- Parameters:
context
- the context of evalution- Returns:
- the evaluated value
-
isValid
public boolean isValid()Description copied from class:ServiceArgument
Returnstrue
if service argument is valid- Overrides:
isValid
in classServiceArgument<RT>
- Returns:
true
if service argument is valid
-
toString
- Overrides:
toString
in classServiceArgument<RT>
-
getPlaceholderText
Returns the value placeholder text. Defalult implementation returns theString
<Calculated>
- Returns:
- the value placeholder text
-