Package com.walkfares.odsl.var
Class VarHelper
java.lang.Object
com.walkfares.odsl.var.VarHelper
public class VarHelper extends Object
-
Constructor Summary
Constructors Constructor Description VarHelper(OpenDSLContext context)
VarHelper(OpenDSLContext context, OpenDSLVarVisitor visitor)
-
Method Summary
Modifier and Type Method Description Var
callMethod(org.antlr.v4.runtime.Token token, Object var, String name, List<Var> params)
Var
callWrappedMethod(org.antlr.v4.runtime.Token token, VarObjectWrapper var, String name, List<Var> params)
static void
checkValidAssignment(DeclaredProperty property, Var var)
static Var
createInstance(DeclaredAttribute attribute)
static VarScalar
createVarScalar(com.google.gson.JsonElement e)
Var
getDynamicProperty(DynamicVar var, String property)
Method
getExactMethod(Object var, String name, List<Var> params)
Field
getField(Object var, String name)
String
getFieldDescription(Var var, String property)
int
getMethodParameterCount(Method m)
String
getMethodParameterNames(Method m)
List<Method>
getMethods(Object var, String name)
static double
getNumber(com.walkfares.odsl.grammar.OpenDSLParser.NumberContext ctx)
int
getParameterCount(Method m)
Var
getProperty(org.antlr.v4.runtime.Token token, Object var, String property)
static String
getString(com.walkfares.odsl.grammar.OpenDSLParser.StringContext ctx)
static String
getTypeDescription(VarType type)
boolean
hasProperty(Object var, String property)
static String
removeQuotes(String str1)
void
setDynamicProperty(DynamicVar var, String property, Var value)
void
setProperty(org.antlr.v4.runtime.Token token, Object var, String property, Var value)
static List<Var>
toList(double[] data)
void
validateType(String text)
-
Constructor Details
-
Method Details
-
getDynamicProperty
-
setDynamicProperty
-
hasProperty
-
getProperty
-
setProperty
-
getField
- Throws:
NoSuchFieldException
-
getFieldDescription
-
getMethods
-
callWrappedMethod
public Var callWrappedMethod(org.antlr.v4.runtime.Token token, VarObjectWrapper var, String name, List<Var> params) -
callMethod
-
getExactMethod
-
getParameterCount
-
getMethodParameterNames
-
getMethodParameterCount
-
getTypeDescription
-
createInstance
-
checkValidAssignment
-
validateType
-
getNumber
public static double getNumber(com.walkfares.odsl.grammar.OpenDSLParser.NumberContext ctx) -
getString
-
removeQuotes
-
toList
-
createVarScalar
-