Interface KeyExpressionVisitor<S extends KeyExpressionVisitor.State,R extends KeyExpressionVisitor.Result>
-
- Type Parameters:
S
- the type of the state object which depends on the specific implementationR
- the type of the result object which is returned by all visitation methods
- All Known Subinterfaces:
ExpansionVisitor<S>
- All Known Implementing Classes:
PrimaryAccessExpansionVisitor
,ValueIndexExpansionVisitor
,ValueIndexLikeExpansionVisitor
public interface KeyExpressionVisitor<S extends KeyExpressionVisitor.State,R extends KeyExpressionVisitor.Result>
An interface to provide a state-based visitor pattern that can traverse a tree ofKeyExpression
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
KeyExpressionVisitor.Result
Tag interface to capture the result being returned by visitation methods of this visitor.static interface
KeyExpressionVisitor.State
Tag interface to capture state within this visitor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S
getCurrentState()
Method to return the (immutable) current state.R
visitExpression(EmptyKeyExpression emptyKeyExpression)
Specific method that is called onEmptyKeyExpression
s.R
visitExpression(FieldKeyExpression fieldKeyExpression)
Specific method that is called onFieldKeyExpression
s.R
visitExpression(KeyExpression keyExpression)
Default method that is called on unknown sub classes ofKeyExpression
.R
visitExpression(KeyExpressionWithValue keyExpressionWithValue)
Specific method that is called onKeyExpressionWithValue
s.R
visitExpression(KeyWithValueExpression keyWithValueExpression)
Specific method that is called onKeyWithValueExpression
s.R
visitExpression(NestingKeyExpression nestingKeyExpression)
Specific method that is called onNestingKeyExpression
s.R
visitExpression(ThenKeyExpression thenKeyExpression)
Specific method that is called onThenKeyExpression
s.
-
-
-
Method Detail
-
getCurrentState
S getCurrentState()
Method to return the (immutable) current state.- Returns:
- the current state of type
S
-
visitExpression
@Nonnull R visitExpression(@Nonnull KeyExpression keyExpression)
Default method that is called on unknown sub classes ofKeyExpression
. That makes it possible to add avisitor.visitExpression(this)
regardless whether the visitor defines an actual specific override for the sub class ofthis
or not.- Parameters:
keyExpression
- key expression to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull R visitExpression(@Nonnull EmptyKeyExpression emptyKeyExpression)
Specific method that is called onEmptyKeyExpression
s.- Parameters:
emptyKeyExpression
-EmptyKeyExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull R visitExpression(@Nonnull FieldKeyExpression fieldKeyExpression)
Specific method that is called onFieldKeyExpression
s.- Parameters:
fieldKeyExpression
-FieldKeyExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull R visitExpression(@Nonnull KeyExpressionWithValue keyExpressionWithValue)
Specific method that is called onKeyExpressionWithValue
s.- Parameters:
keyExpressionWithValue
-KeyExpressionWithValue
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull R visitExpression(@Nonnull KeyWithValueExpression keyWithValueExpression)
Specific method that is called onKeyWithValueExpression
s.- Parameters:
keyWithValueExpression
-KeyWithValueExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull R visitExpression(@Nonnull NestingKeyExpression nestingKeyExpression)
Specific method that is called onNestingKeyExpression
s.- Parameters:
nestingKeyExpression
-NestingKeyExpression
to visit- Returns:
- a new expression of type
R
-
visitExpression
@Nonnull R visitExpression(@Nonnull ThenKeyExpression thenKeyExpression)
Specific method that is called onThenKeyExpression
s.- Parameters:
thenKeyExpression
-ThenKeyExpression
to visit- Returns:
- a new expression of type
R
-
-