Class DynamicArgument<CT,RT>

java.lang.Object
chemaxon.marvin.services.ServiceArgument<RT>
chemaxon.marvin.services.DynamicArgument<CT,RT>
Type Parameters:
CT - the context type
RT - the result type

@PublicApi public abstract class DynamicArgument<CT,RT> extends ServiceArgument<RT>
ServiceArguments 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
  • Constructor Details

    • DynamicArgument

      protected DynamicArgument()
    • DynamicArgument

      protected DynamicArgument(String expression)
  • Method Details

    • setExpression

      public void setExpression(String expression)
      Sets the expression
      Parameters:
      expression - used for evaluation
    • getExpression

      public String getExpression()
      Returns the expression used for evaluations
      Returns:
      the expression used for evaluations
    • evaluate

      public abstract RT evaluate(CT context)
      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
      Returns true if service argument is valid
      Overrides:
      isValid in class ServiceArgument<RT>
      Returns:
      true if service argument is valid
    • toString

      public String toString()
      Overrides:
      toString in class ServiceArgument<RT>
    • getPlaceholderText

      public String getPlaceholderText()
      Returns the value placeholder text. Defalult implementation returns the String <Calculated>
      Returns:
      the value placeholder text