public class ExpressionAnalyser
extends java.lang.Object
Constructor and Description |
---|
ExpressionAnalyser() |
Modifier and Type | Method and Description |
---|---|
Constant |
asConstant(Expression expr)
Return the Expression as a Constant or null if this is not a Constant.
|
Variable |
asVariable(Expression expr)
Return the Expression as a Variable or null if this is not a Variable.
|
java.util.Map<java.lang.String,Variable> |
getLocalVariables(Expression expr)
Analyse an Expression to get the Map of local Variables which are defined in this expression.
|
java.util.Map<java.lang.String,Variable> |
getVariables(Expression expr)
Analyse an Expression to get the Map of Variables which are defined in this expression.
|
java.util.Map<java.lang.String,Variable> |
getVariables(Expression expr,
boolean includeLocals)
Analyse an Expression to get the Map of Variables which are defined in this expression.
|
java.util.List<Variable> |
getVariablesList(Expression expr)
Analyse an Expression to get the list of Variables which are defined in this expression.
|
boolean |
isConstant(Expression expr)
Return true if an Expression is a constant.
|
boolean |
isVariable(Expression expr)
Return true if an Expression is a variable.
|
public boolean isConstant(Expression expr)
expr
- the expressionpublic boolean isVariable(Expression expr)
expr
- the expressionpublic Constant asConstant(Expression expr)
expr
- the expressionpublic Variable asVariable(Expression expr)
expr
- the expressionpublic java.util.List<Variable> getVariablesList(Expression expr)
expr
- the expressionpublic java.util.Map<java.lang.String,Variable> getVariables(Expression expr)
expr
- the expressionpublic java.util.Map<java.lang.String,Variable> getVariables(Expression expr, boolean includeLocals)
expr
- the expressionincludeLocals
- true if local variables shoudl be includedpublic java.util.Map<java.lang.String,Variable> getLocalVariables(Expression expr)
expr
- the expressionCopyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence