Interface IValueSource

All Known Implementing Classes:
ContextDelegate, ForeachContext

public interface IValueSource
Interface that allows the expression parser to retrieve values and objects from an external source during the evaluation of expressions.
Since:
5.0
Author:
O. Kerpershoek, F. van der Meer
  • Method Summary

    Modifier and Type
    Method
    Description
    getAllObjects(String name, boolean includeDerivedObjects)
    This method can be used to request all objects of a specified type.
    getNamedObject(String objectName, String instanceName)
    This method will request an object that is a static instance.
    This method will request an object that is either a singleton object or an active object (from the InstanceStack).
    This method will be used to request a single static value.
  • Method Details

    • getObject

      ICompoundValue getObject(String name)
      This method will request an object that is either a singleton object or an active object (from the InstanceStack).
      Parameters:
      name - The type name for which the object value is requested.
      Returns:
      Object value for the specified type name.
    • getNamedObject

      ICompoundValue getNamedObject(String objectName, String instanceName)
      This method will request an object that is a static instance.
      Parameters:
      objectName - The name object the object
      instanceName - The name of the instance
      Returns:
      Object value for the specified type name, null when not known.
    • getAllObjects

      ICompoundValue[] getAllObjects(String name, boolean includeDerivedObjects)
      This method can be used to request all objects of a specified type. When no objects are available for the specified type, an empty array should be returned.
      Parameters:
      name - The type name for which all object are requested.
      includeDerivedObjects - Boolean indicating if objects derived from the specified type should also be returned.
      Returns:
      Array containing all objects of the specified type.
    • getValue

      IValue getValue(String name)
      This method will be used to request a single static value. Examples of such values are Defines like
      • PI
      • TODAY
      • VERSION
      IF a THEN 10 IF a THEN 10 ELSE UNKNOWN In the example above this method will be called to request the value of a.
      Parameters:
      name - The name of the global value that is requested.
      Returns:
      The value for the specified name.