ModifierVisitor

This visitor can be used to save time when some specific nodes needs to be changed. To do that just extend this class and override the methods from the nodes who needs to be changed, returning the changed node. Returning null will remove the node.

If a node is removed that was required in its parent node, the parent node will be removed too.

Author

Julio Vilmar Gesser

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun visit(n: ArrayCreationLevel, arg: A): Visitable
open fun visit(n: CompilationUnit, arg: A): Visitable
open fun visit(n: ImportDeclaration, arg: A): Node
open fun visit(n: Modifier, arg: A): Visitable
open fun visit(n: NodeList<out Any>, arg: A): Visitable
open fun visit(n: PackageDeclaration, arg: A): Visitable
open fun visit(n: EnumDeclaration, arg: A): Visitable
open fun visit(n: FieldDeclaration, arg: A): Visitable
open fun visit(n: MethodDeclaration, arg: A): Visitable
open fun visit(n: Parameter, arg: A): Visitable
open fun visit(n: ReceiverParameter, arg: A): Visitable
open fun visit(n: RecordDeclaration, arg: A): Visitable
open fun visit(n: VariableDeclarator, arg: A): Visitable
open fun visit(n: BlockComment, arg: A): Visitable
open fun visit(n: LineComment, arg: A): Visitable
open fun visit(n: MarkdownComment, arg: A): Visitable
open fun visit(n: ArrayAccessExpr, arg: A): Visitable
open fun visit(n: ArrayCreationExpr, arg: A): Visitable
open fun visit(n: AssignExpr, arg: A): Visitable
open fun visit(n: BinaryExpr, arg: A): Visitable
open fun visit(n: BooleanLiteralExpr, arg: A): Visitable
open fun visit(n: CastExpr, arg: A): Visitable
open fun visit(n: CharLiteralExpr, arg: A): Visitable
open fun visit(n: ClassExpr, arg: A): Visitable
open fun visit(n: ConditionalExpr, arg: A): Visitable
open fun visit(n: DoubleLiteralExpr, arg: A): Visitable
open fun visit(n: EnclosedExpr, arg: A): Visitable
open fun visit(n: FieldAccessExpr, arg: A): Visitable
open fun visit(n: InstanceOfExpr, arg: A): Visitable
open fun visit(n: IntegerLiteralExpr, arg: A): Visitable
open fun visit(n: LambdaExpr, arg: A): Visitable
open fun visit(n: LongLiteralExpr, arg: A): Visitable
open fun visit(n: MatchAllPatternExpr, arg: A): Visitable
open fun visit(n: MemberValuePair, arg: A): Visitable
open fun visit(n: MethodCallExpr, arg: A): Visitable
open fun visit(n: MethodReferenceExpr, arg: A): Visitable
open fun visit(n: Name, arg: A): Visitable
open fun visit(n: NameExpr, arg: A): Visitable
open fun visit(n: NullLiteralExpr, arg: A): Visitable
open fun visit(n: ObjectCreationExpr, arg: A): Visitable
open fun visit(n: RecordPatternExpr, arg: A): Visitable
open fun visit(n: SimpleName, arg: A): Visitable
open fun visit(n: StringLiteralExpr, arg: A): Visitable
open fun visit(n: SuperExpr, arg: A): Visitable
open fun visit(n: SwitchExpr, arg: A): Visitable
open fun visit(n: ThisExpr, arg: A): Visitable
open fun visit(n: TypeExpr, arg: A): Visitable
open fun visit(n: TypePatternExpr, arg: A): Visitable
open fun visit(n: UnaryExpr, arg: A): Visitable
open fun visit(n: JmlFieldDeclaration, arg: A): Visitable
open fun visit(n: JmlCallableClause, arg: A): Visitable
open fun visit(n: JmlContract, arg: A): Visitable
open fun visit(n: JmlForallClause, arg: A): Visitable
open fun visit(n: JmlInfFlowClause, arg: A): Visitable
open fun visit(n: JmlLabledClause, arg: A): Visitable
open fun visit(n: JmlMethodSignature, arg: A): Visitable
open fun visit(n: JmlMultiExprClause, arg: A): Visitable
open fun visit(n: JmlOldClause, arg: A): Visitable
open fun visit(n: JmlSignalsClause, arg: A): Visitable
open fun visit(n: JmlSimpleExprClause, arg: A): Visitable
open fun visit(n: JmlDoc, arg: A): Visitable
open fun visit(n: JmlDocDeclaration, arg: A): Visitable
open fun visit(n: JmlDocStmt, arg: A): Visitable
open fun visit(n: JmlDocType, arg: A): Visitable
open fun visit(n: JmlBinaryInfixExpr, arg: A): Visitable
open fun visit(n: JmlLabelExpr, arg: A): Visitable
open fun visit(n: JmlLetExpr, arg: A): Visitable
open fun visit(n: JmlMultiCompareExpr, arg: A): Visitable
open fun visit(n: JmlQuantifiedExpr, arg: A): Visitable
open fun visit(n: JmlTypeExpr, arg: A): Visitable
open fun visit(n: JmlBeginStmt, arg: A): Visitable
open fun visit(n: JmlEndStmt, arg: A): Visitable
open fun visit(n: JmlExpressionStmt, arg: A): Visitable
open fun visit(n: JmlGhostStmt, arg: A): Visitable
open fun visit(n: JmlLabelStmt, arg: A): Visitable
open fun visit(n: JmlRefiningStmt, arg: A): Visitable
open fun visit(n: JmlUnreachableStmt, arg: A): Visitable
open fun visit(n: KeyCatchAllStmt, arg: A): Visitable
open fun visit(n: KeyCcatchBreak, arg: A): Visitable
open fun visit(n: KeyCcatchContinue, arg: A): Visitable
open fun visit(n: KeyCcatchParameter, arg: A): Visitable
open fun visit(n: KeyCcatchReturn, arg: A): Visitable
open fun visit(n: KeyEscapeExpression, arg: A): Visitable
open fun visit(n: KeyExecStmt, arg: A): Visitable
open fun visit(n: KeyExecutionContext, arg: A): Visitable
open fun visit(n: KeyMarkerStatement, arg: A): Visitable
open fun visit(n: KeyMergePointStmt, arg: A): Visitable
open fun visit(n: KeyMethodCallStmt, arg: A): Visitable
open fun visit(n: KeyMethodSignature, arg: A): Visitable
open fun visit(n: KeyTransactionStmt, arg: A): Visitable
open fun visit(n: KeyCcatchSV, arg: A): Visitable
open fun visit(n: KeyExecCtxtSV, arg: A): Visitable
open fun visit(n: KeyExpressionSV, arg: A): Visitable
open fun visit(n: KeyJumpLabelSV, arg: A): Visitable
open fun visit(n: KeyMetaConstruct, arg: A): Visitable
open fun visit(n: KeyStatementSV, arg: A): Visitable
open fun visit(n: KeyTypeSV, arg: A): Visitable
open fun visit(n: ModuleDeclaration, arg: A): Visitable
open fun visit(n: ModuleUsesDirective, arg: A): Visitable
open fun visit(n: AssertStmt, arg: A): Visitable
open fun visit(n: BlockStmt, arg: A): Visitable
open fun visit(n: BreakStmt, arg: A): Visitable
open fun visit(n: CatchClause, arg: A): Visitable
open fun visit(n: ContinueStmt, arg: A): Visitable
open fun visit(n: DoStmt, arg: A): Visitable
open fun visit(n: EmptyStmt, arg: A): Visitable
open fun visit(n: ExpressionStmt, arg: A): Visitable
open fun visit(n: ForEachStmt, arg: A): Visitable
open fun visit(n: ForStmt, arg: A): Visitable
open fun visit(n: IfStmt, arg: A): Visitable
open fun visit(n: LabeledStmt, arg: A): Visitable
open fun visit(n: ReturnStmt, arg: A): Visitable
open fun visit(n: SwitchEntry, arg: A): Visitable
open fun visit(n: SwitchStmt, arg: A): Visitable
open fun visit(n: SynchronizedStmt, arg: A): Visitable
open fun visit(n: ThrowStmt, arg: A): Visitable
open fun visit(n: TryStmt, arg: A): Visitable
open fun visit(n: UnparsableStmt, arg: A): Visitable
open fun visit(n: WhileStmt, arg: A): Visitable
open fun visit(n: YieldStmt, arg: A): Visitable
open fun visit(n: ArrayType, arg: A): Visitable
open fun visit(n: IntersectionType, arg: A): Visitable
open fun visit(n: PrimitiveType, arg: A): Visitable
open fun visit(n: TypeParameter, arg: A): Visitable
open fun visit(n: UnionType, arg: A): Visitable
open fun visit(n: UnknownType, arg: A): Visitable
open fun visit(n: VarType, arg: A): Visitable
open fun visit(n: VoidType, arg: A): Visitable
open fun visit(n: WildcardType, arg: A): Visitable