Top Description Inners Methods
com.github.javaparser.ast.observer

public Interface AstObserver

Known Direct Implementers
com.github.javaparser.ast.observer.AstObserverAdapter, com.github.javaparser.ast.observer.PropagatingAstObserver
Imports
com.github.javaparser.ast.Node, .NodeList

An Observer for an AST element (either a Node or a NodeList).

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
AstObserver.ListChangeType

Type of change occurring on a List

Method Summary

Modifier and TypeMethod and Description
public void
listChange(NodeList<N extends Node>
list changed
observedNode
,
AstObserver.ListChangeType
type of change
type
,
int
position at which the changed occurred
index
,
Node
element added or removed
nodeAddedOrRemoved
)

A list is changed

public void
listReplacement(NodeList<N extends Node> observedNode, int index, Node oldNode, Node newNode)

public void
parentChange(Node
node of which the parent is changed
observedNode
,
Node
previous parent
previousParent
,
Node
new parent
newParent
)

The parent of a node is changed

public void
propertyChange(Node
owner of the property
observedNode
,
ObservableProperty
property changed
property
,
Object
value of the property before the change
oldValue
,
Object
value of the property after the change
newValue
)

The value of a property is changed

Method Detail

listChangeback to summary
public void listChange(NodeList<N extends Node> observedNode, AstObserver.ListChangeType type, int index, Node nodeAddedOrRemoved)

A list is changed

Parameters
observedNode:NodeList<N extends Node>

list changed

type:AstObserver.ListChangeType

type of change

index:int

position at which the changed occurred

nodeAddedOrRemoved:Node

element added or removed

listReplacementback to summary
public void listReplacement(NodeList<N extends Node> observedNode, int index, Node oldNode, Node newNode)
parentChangeback to summary
public void parentChange(Node observedNode, Node previousParent, Node newParent)

The parent of a node is changed

Parameters
observedNode:Node

node of which the parent is changed

previousParent:Node

previous parent

newParent:Node

new parent

propertyChangeback to summary
public void propertyChange(Node observedNode, ObservableProperty property, Object oldValue, Object newValue)

The value of a property is changed

Parameters
observedNode:Node

owner of the property

property:ObservableProperty

property changed

oldValue:Object

value of the property before the change

newValue:Object

value of the property after the change

com.github.javaparser.ast.observer back to summary

public final Enum AstObserver.ListChangeType

extends Enum<AstObserver.ListChangeType>
Class Inheritance

Type of change occurring on a List

Field Summary

Modifier and TypeField and Description
public static final AstObserver.ListChangeType
public static final AstObserver.ListChangeType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static AstObserver.ListChangeType
public static AstObserver.ListChangeType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ADDITIONback to summary
public static final AstObserver.ListChangeType ADDITION
REMOVALback to summary
public static final AstObserver.ListChangeType REMOVAL

Constructor Detail

ListChangeTypeback to summary
private ListChangeType()

Method Detail

valueOfback to summary
public static AstObserver.ListChangeType valueOf(String name)
valuesback to summary
public static AstObserver.ListChangeType[] values()