Class Binding

    • Constructor Detail

      • Binding

        public Binding​(String varName,
                       com.fasterxml.jackson.databind.JsonNode value)
        Constructor using a simple element (not an expression needing to be parsed)
        Parameters:
        varName - name of the variable to be assigned a value
        value - the value to be assigned to the variable name
      • Binding

        public Binding​(String varName,
                       String expression)
                throws ParseException,
                       IOException
        Constructor using a variable name and either a variable or function declaration expression
        Parameters:
        varName - name of the variable
        expression - a variable or function declaration expression
        Throws:
        ParseException
        IOException
    • Method Detail

      • getVarName

        public String getVarName()
        Returns:
        the name of the variable or function declaration
      • getFunction

        public DeclaredFunction getFunction()
        Returns:
        the function declaration if the type is BindingType.FUNCTION, otherwise returns null
      • getType

        public com.api.jsonata4java.BindingType getType()
        Returns:
        the type of binding (either BindingType.VARIABLE or BindingType.FUNCTION)
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        the string representation of the variable or function declaration
      • main

        public static void main​(String[] args)
        Test routine for Binding construction
        Parameters:
        args - not used