Package com.api.jsonata4java
Class Binding
java.lang.Object
com.api.jsonata4java.Binding
- All Implemented Interfaces:
Serializable
Class mapping a variable name to a variable or function declaration
expression
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor using a variable assignment expressionConstructor using a simple element (not an expression needing to be parsed)Constructor using a variable name and either a variable or function declaration expression -
Method Summary
-
Constructor Details
-
Binding
Constructor using a variable assignment expression- Parameters:
expression- the variable assignment expression- Throws:
ParseExceptionIOException
-
Binding
Constructor using a simple element (not an expression needing to be parsed)- Parameters:
varName- name of the variable to be assigned a valuevalue- the value to be assigned to the variable name- Throws:
ParseException
-
Binding
Constructor using a variable name and either a variable or function declaration expression- Parameters:
varName- name of the variableexpression- a variable or function declaration expression- Throws:
ParseExceptionIOException
-
-
Method Details
-
getVarName
- Returns:
- the name of the variable or function declaration
-
getFunction
- Returns:
- the function declaration if the type is BindingType.FUNCTION, otherwise returns null
-
getExpression
- Returns:
- the expression defining the variable or function declaration
-
getType
public com.api.jsonata4java.BindingType getType()- Returns:
- the type of binding (either BindingType.VARIABLE or BindingType.FUNCTION)
-
toString
-
main
Test routine for Binding construction- Parameters:
args- not used
-