Interface Visitable

All Known Subinterfaces:
Case, Case.CaseEnding, Case.GenericCase, Case.SimpleCase, Clause, Condition, Expression, Literal<T>, Node, PatternElement, ProcedureCall, Property, Relationship, RelationshipPattern, ResultStatement, Statement, Statement.RegularQuery, Statement.SingleQuery, Statement.UnionQuery, Statement.UseStatement, SubqueryExpression, Use
All Known Implementing Classes:
AliasedExpression, Asterisk, BooleanLiteral, Comparison, ConstantCondition, CountExpression, Create, Delete, ExistentialSubquery, Foreach, FunctionInvocation, HasLabelCondition, Hint, InTransactions, KeyValueMapEntry, Limit, ListComprehension, ListExpression, ListLiteral, ListOperator, MapExpression, MapProjection, Match, Merge, MergeAction, NamedPath, NestedExpression, NodeBase, NodeLabel, NullLiteral, NumberLiteral, Operation, Operator, Order, Parameter, PatternComprehension, Properties, PropertyLookup, Reduction, Relationship.Details, RelationshipBase, RelationshipChain, Remove, Return, ReturnBody, Set, Skip, SortItem, SortItem.Direction, StringLiteral, Subquery, SymbolicName, TemporalLiteral, TypedSubtree, UnionPart, Unwind, Where, With

public interface Visitable
Interface for implementations that accepts visitors.
Since:
1.0
Author:
Michael Simons
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(Visitor visitor)
    Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
    static void
    visitIfNotNull(Visitable visitable, Visitor visitor)
    A helper method that presents the visitor to the visitable if the visitable is not null.
  • Method Details

    • visitIfNotNull

      static void visitIfNotNull(Visitable visitable, Visitor visitor)
      A helper method that presents the visitor to the visitable if the visitable is not null. Not meant to be overridden.
      Parameters:
      visitable - The visitable to visit if not null
      visitor - The visitor to use
    • accept

      default void accept(Visitor visitor)
      Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
      Parameters:
      visitor - the visitor to notify, must not be null.