Package org.geotools.filter.visitor
Class IsStaticExpressionVisitor
Object
IsStaticExpressionVisitor
- All Implemented Interfaces:
ExpressionVisitor
Check if an expression is static (ie does not contain a PropertyName expression).
This visitor will "short-circuit" the moment it finds a PropertyName expression and will not need to visit the entire data structure.
Example:
if( filter.accepts( IsStaticExpressionVisitor.VISITOR, null ) ){
Color color = expression.evaulate( null, Color.class );
...
}
- Author:
- Jody
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
visit each expression and check that they are static -
Method Summary
Modifier and TypeMethodDescriptionvisit each expression and check that they are staticvisit each expression and check that they are staticVisit each parameter and check if they are staticLiteral expressions are always static.visit each expression and check that they are static.visit
(NilExpression expression, Object data) visit each expression and check that they are staticvisit
(PropertyName expression, Object data) If even a single PropertyName is found in the expression the expression is not static.visit each expression and check that they are static.
-
Field Details
-
VISITOR
-
-
Constructor Details
-
IsStaticExpressionVisitor
protected IsStaticExpressionVisitor()visit each expression and check that they are static
-
-
Method Details
-
visit
visit each expression and check that they are static- Specified by:
visit
in interfaceExpressionVisitor
- Returns:
- implementation specific
-
visit
visit each expression and check that they are static- Specified by:
visit
in interfaceExpressionVisitor
-
visit
visit each expression and check that they are static- Specified by:
visit
in interfaceExpressionVisitor
-
visit
Visit each parameter and check if they are static- Specified by:
visit
in interfaceExpressionVisitor
-
visit
Literal expressions are always static.- Specified by:
visit
in interfaceExpressionVisitor
- Returns:
- true
-
visit
visit each expression and check that they are static.- Specified by:
visit
in interfaceExpressionVisitor
- Returns:
- true if getExpression1 and getExpression2 are static
-
visit
If even a single PropertyName is found in the expression the expression is not static.- Specified by:
visit
in interfaceExpressionVisitor
- Returns:
- false
-
visit
visit each expression and check that they are static.- Specified by:
visit
in interfaceExpressionVisitor
- Returns:
- true if getExpression1 and getExpression2 are static
-