Package org.gvsig.expressionevaluator
Class ExpressionUtils
java.lang.Object
org.gvsig.expressionevaluator.ExpressionUtils
- Author:
- gvSIG Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Codestatic SymbolTablecreateBookmarksSymbolTable(String bookmarkGroup) static CodeBuilderstatic Compilerstatic FilecreateDynamicFile(String expression) static FilecreateDynamicFile(ExpressionBuilder.Value builder) static MutableSymbolTablestatic Expressionstatic ExpressioncreateExpression(String phrase) static ExpressioncreateExpression(Expression expression) static ExpressionBuilderstatic ExpressioncreateExpressionFromJson(javax.json.JsonObject json) static Expressionstatic Interpreterstatic Optimizerstatic org.gvsig.tools.script.ScriptcreateScript(byte[] bytes, String name) static MutableSymbolTablestatic MutableSymbolTablecreateSymbolTable(String name, org.gvsig.tools.dynobject.DynObject obj) static MutableSymbolTablecreateSymbolTable(org.gvsig.tools.dynobject.DynObject obj) static ExpressiondefaultIfEmpty(Expression expression, Expression defaultValue) static ExpressiondefaultIfPhraseEmpty(Expression expression, Expression defaultValue) static ExpressiondefaultNullIfEmpty(Expression expression) static ExpressiondefaultNullIfPhraseEmpty(Expression expression) static Objectstatic Objectevaluate(SymbolTable symbolTable, String expression) static Objectevaluate(SymbolTable symbolTable, Code code) static StringevaluateDynamicText(String source) static StringevaluateDynamicText(SymbolTable symbolTable, String source) static FileevaluateFilename(File source) static FileevaluateFilename(SymbolTable symbolTable, File source) static URLevaluateURL(URL source) static URLevaluateURL(SymbolTable symbolTable, URL source) static ExpressionBuilder.ValuegetHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder) static ExpressionBuilder.ValuegetHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder, SymbolTable symboltable) static StringgetPhrase(Expression expression) static org.gvsig.tools.script.Scriptstatic booleanisDynamicFilename(File source) static booleanisDynamicText(String source) static booleanisDynamicURL(URL source) static booleanisEmpty(Expression expression) static booleanisPhraseEmpty(Expression expression) static booleanisValidIdentifier(String name) static Codeoptimize(SymbolTable symbolTable, Code code) static booleanparseBoolean(String expression) static booleanparseBoolean(SymbolTable symbolTable, String expression, boolean defaultValue) static ColorparseColor(String expression) static ColorparseColor(SymbolTable symbolTable, String expression, Color defaultValue) static doublestatic doubleparseDouble(SymbolTable symbolTable, String expression, double defaultValue) static intstatic intparseInt(SymbolTable symbolTable, String expression, int defaultValue) static longstatic longparseLong(SymbolTable symbolTable, String expression, long defaultValue) static Stringstatic ExpressionBuilder.ValueresolveHostExpressions(ExpressionBuilder.Value statement, SymbolTable symbolTable) static ExpressionresolveHostExpressions(Expression expression, SymbolTable symbolTable) static StringsurroundByDynamicTextTag(String source) static StringsurroundByDynamicTextTag(String source, boolean insert) static Stringstatic Stringstatic StringtoString(ExpressionBuilder.Value value) static StringtoString(ExpressionBuilder.Value value, Formatter formatter)
-
Constructor Details
-
ExpressionUtils
public ExpressionUtils()
-
-
Method Details
-
isEmpty
-
isPhraseEmpty
-
defaultIfEmpty
-
defaultNullIfEmpty
-
defaultIfPhraseEmpty
-
defaultNullIfPhraseEmpty
-
createExpression
-
createExpression
-
createExpression
-
createExpressionBuilder
-
compile
-
evaluate
-
evaluate
-
evaluate
-
optimize
-
toString
-
toString
-
toString
-
toString
-
createExpressionFromJSON
- Parameters:
json-- Returns:
-
createExpressionFromJson
-
createSymbolTable
-
createSymbolTable
-
createSymbolTable
public static MutableSymbolTable createSymbolTable(String name, org.gvsig.tools.dynobject.DynObject obj) -
surroundByDynamicTextTag
-
surroundByDynamicTextTag
-
isDynamicText
-
evaluateDynamicText
-
evaluateDynamicText
-
evaluateFilename
-
evaluateURL
-
isDynamicFilename
-
isDynamicURL
-
createDynamicFile
-
createDynamicFile
-
evaluateFilename
-
evaluateURL
-
parseInt
- Throws:
NumberFormatException
-
parseLong
- Throws:
NumberFormatException
-
parseDouble
- Throws:
NumberFormatException
-
createCompiler
-
createInterpreter
-
createOptimizer
-
repr
-
createCodeBuilder
-
parseBoolean
public static boolean parseBoolean(SymbolTable symbolTable, String expression, boolean defaultValue) -
parseBoolean
-
parseInt
-
parseLong
-
parseDouble
-
parseColor
-
parseColor
-
isValidIdentifier
-
resolveHostExpressions
-
resolveHostExpressions
public static ExpressionBuilder.Value resolveHostExpressions(ExpressionBuilder.Value statement, SymbolTable symbolTable) -
getHostExpressionValue
public static ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder) -
getHostExpressionValue
public static ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder, SymbolTable symboltable) -
getPhrase
-
createScript
-
getScript
public static org.gvsig.tools.script.Script getScript(org.gvsig.tools.resourcesstorage.ResourcesStorage resources, String resourceName) -
createEmptySymbolTable
-
createBookmarksSymbolTable
-