Observable
AnnotationDeclaration
, AnnotationExpr
, AnnotationMemberDeclaration
, ArrayAccessExpr
, ArrayCreationExpr
, ArrayCreationLevel
, ArrayInitializerExpr
, ArrayType
, AssertStmt
, AssignExpr
, BinaryExpr
, BlockComment
, BlockStmt
, BodyDeclaration
, BooleanLiteralExpr
, BreakStmt
, CallableDeclaration
, CastExpr
, CatchClause
, CharLiteralExpr
, ClassExpr
, ClassOrInterfaceDeclaration
, ClassOrInterfaceType
, Comment
, CompilationUnit
, ConditionalExpr
, ConstructorDeclaration
, ContinueStmt
, DoStmt
, DoubleLiteralExpr
, EmptyStmt
, EnclosedExpr
, EnumConstantDeclaration
, EnumDeclaration
, ExplicitConstructorInvocationStmt
, Expression
, ExpressionStmt
, FieldAccessExpr
, FieldDeclaration
, ForeachStmt
, ForStmt
, IfStmt
, ImportDeclaration
, InitializerDeclaration
, InstanceOfExpr
, IntegerLiteralExpr
, IntersectionType
, JavadocComment
, LabeledStmt
, LambdaExpr
, LineComment
, LiteralExpr
, LiteralStringValueExpr
, LocalClassDeclarationStmt
, LongLiteralExpr
, MarkerAnnotationExpr
, MemberValuePair
, MethodCallExpr
, MethodDeclaration
, MethodReferenceExpr
, ModuleDeclaration
, ModuleExportsStmt
, ModuleOpensStmt
, ModuleProvidesStmt
, ModuleRequiresStmt
, ModuleStmt
, ModuleUsesStmt
, Name
, NameExpr
, Node
, NodeList
, NormalAnnotationExpr
, NullLiteralExpr
, ObjectCreationExpr
, PackageDeclaration
, Parameter
, PrimitiveType
, ReferenceType
, ReturnStmt
, SimpleName
, SingleMemberAnnotationExpr
, Statement
, StringLiteralExpr
, SuperExpr
, SwitchEntryStmt
, SwitchStmt
, SynchronizedStmt
, ThisExpr
, ThrowStmt
, TryStmt
, Type
, TypeDeclaration
, TypeExpr
, TypeParameter
, UnaryExpr
, UnionType
, UnknownType
, UnparsableStmt
, VariableDeclarationExpr
, VariableDeclarator
, VoidType
, WhileStmt
, WildcardType
public interface HasParentNode<T> extends Observable
Modifier and Type | Method | Description |
---|---|---|
default <N> Optional<N> |
getAncestorOfType(Class<N> classType) |
Get the ancestor of the node having the given type, or null if no ancestor of the given type is found.
|
Optional<Node> |
getParentNode() |
Return the parent node or null, if no parent is set.
|
Node |
getParentNodeForChildren() |
this for everything except NodeLists.
|
T |
setParentNode(Node parentNode) |
Set the parent node.
|
isRegistered, register, unregister
T setParentNode(Node parentNode)
parentNode
- the parent node or null, to set no parentNode getParentNodeForChildren()
Copyright © 2007–2019. All rights reserved.