Class BslValuePath


  • public class BslValuePath
    extends Object
    1C:Enterprise Runtime debug process path of BSL value. Represents path to value of BSL variables or expressions. Can be used to perform evaluations with 1C:Enteprise Runtime debug server.

    For example, if client needs to evaluate:

     expression
        |
        +-- property1
        |
        +-> property2
              |
              +-- property3
              |
              +-> targetValue
     
    Then client needs to create the next value path:
     BslValuePath path = new BslValuePath("expression").toProperty("property2").toProperty("targetValue");
     

    Order of elements in path is important. Instances of BslValuePath are immutable. Clients may use methods toProperty(String), toArrayElement(Integer) and toEnumElement(Integer) to construct new instances of BslValuePath.

    See Also:
    IEvaluationEngine
    • Constructor Detail

      • BslValuePath

        public BslValuePath​(String expression)
        Constructor for BslValuePath.
        Parameters:
        expression - base expression to create path, will be added as first element of path, cannot be null
    • Method Detail

      • getExpression

        public String getExpression()
        Returns expression. Will be equal to first element of full path.
        Returns:
        expression, never null
      • getPropertiesAndIndexes

        public List<BslValuePathItem<?>> getPropertiesAndIndexes()
        Returns properties and indexes path. Will be equal to full path excluding first element (expression).
        Returns:
        properties and indexes path, never null
      • toProperty

        public BslValuePath toProperty​(String property)
        Create child BSL-value path from this to given property. Parent path remains unchanged.
        Parameters:
        property - property to create path to, cannot be null
        Returns:
        new child BSL-value path from parent to given property, never null
      • toArrayElement

        public BslValuePath toArrayElement​(Integer index)
        Create child BSL-value path from this to given array index. Parent path remains unchanged.
        Parameters:
        index - array index to create path to, cannot be null
        Returns:
        new child BSL-value path from parent to given array index, never null
      • toEnumElement

        public BslValuePath toEnumElement​(Integer index)
        Create child BSL-value path from this to given enum index. Parent path remains unchanged.
        Parameters:
        index - enum index to create path to, cannot be null
        Returns:
        new child BSL-value path from parent to given enum index, never null
      • canEvaluate

        public boolean canEvaluate()
        Returns whether this BSL value path can be evaluated in 1C:Enterprise Runtime debug server.

        If true returned, evaluation expression can be constructed by toString() method result.

        Returns:
        whether this BSL value path can be evaluated in 1C:Enterprise Runtime debug server
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object