Uses of Class
com.github.javaparser.ast.Node
Packages that use Node
Package
Description
Implementation of model based on JavaParser.
Implementation of model based on Javassist.
Implementation of model based on reflection.
-
Uses of Node in com.github.javaparser
Methods in com.github.javaparser with type parameters of type NodeModifier and TypeMethodDescription<N extends Node>
ParseResult<N> JavaParser.parse(ParseStart<N> start, Provider provider) Parses source code.Methods in com.github.javaparser that return NodeModifier and TypeMethodDescriptionHasParentNode.getParentNodeForChildren()Returns the parent node from the perspective of the children of this node.Methods in com.github.javaparser that return types with arguments of type NodeModifier and TypeMethodDescriptionHasParentNode.getParentNode()Returns the parent node, orOptional.emptyif no parent is set.Methods in com.github.javaparser with parameters of type NodeModifier and TypeMethodDescriptiondefault booleanHasParentNode.isDescendantOf(Node ancestor) Determines whether thisHasParentNodenode is a descendant of the given node.HasParentNode.setParentNode(Node parentNode) Sets the parent node.Method parameters in com.github.javaparser with type arguments of type NodeModifier and TypeMethodDescriptionvoidProcessor.postProcess(ParseResult<? extends Node> result, ParserConfiguration configuration) Makes the parser do a post-parsing step before the result is returned to the user. -
Uses of Node in com.github.javaparser.ast
Classes in com.github.javaparser.ast with type parameters of type NodeSubclasses of Node in com.github.javaparser.astModifier and TypeClassDescriptionclassInnew int[1][2];there are two ArrayCreationLevel objects, the first one contains the expression "1", the second the expression "2".classThis class represents the entire compilation unit.classAn import declaration.classA modifier, like private, public, or volatile.classA package declaration.Classes in com.github.javaparser.ast that implement interfaces with type arguments of type NodeModifier and TypeClassDescriptionclassBase class for all nodes of the abstract syntax tree.classBase class for all nodes of the abstract syntax tree.classBase class for all nodes of the abstract syntax tree.static classPerforms a breadth-first node traversal starting with a given node.static classPerforms a simple traversal over all nodes that have the passed node as their parent.static classIterates over the parent of the node, then the parent's parent, then the parent's parent's parent, until running out of parents.static classPerforms a post-order (or leaves-first) node traversal starting with a given node.static classPerforms a pre-order (or depth-first) node traversal starting with a given node.Methods in com.github.javaparser.ast with type parameters of type NodeModifier and TypeMethodDescriptionWalks the AST with pre-order traversal, returning all nodes of type "nodeType".Node.findAll(Class<T> nodeType, Node.TreeTraversal traversal) Walks the AST with specified traversal order, returning all nodes of type "nodeType".Walks the AST with pre-order traversal, returning all nodes of type "nodeType" that match the predicate.Walks the AST with pre-order traversal, returning the first node of type "nodeType" or empty() if none is found.Walks the AST with pre-order traversal, returning the first node of type "nodeType" that matches "predicate" or empty() if none is found.Node.getChildNodesByType(Class<N> clazz) Deprecated.Node.getNodesByType(Class<N> clazz) Deprecated.useNode.findAll(Class)but be aware that findAll also considers the initial node.NodeList.nodeList(Collection<X> nodes) NodeList.nodeList(X... nodes) NodeList.toNodeList()<T extends Node>
voidWalks the AST with pre-order traversal, calling the consumer for every node of type "nodeType".Methods in com.github.javaparser.ast that return NodeModifier and TypeMethodDescriptionNode.clone()Node.findRootNode()Finds the root node of this AST by finding the topmost parent.Node.getParentNodeForChildren()NodeList.getParentNodeForChildren()Node.BreadthFirstIterator.next()Node.DirectChildrenIterator.next()Node.ParentsVisitor.next()Node.PostOrderIterator.next()Node.PreOrderIterator.next()Node.removeComment()final NodeNode.setBlockComment(String comment) Use this to store additional information to this node.Node.setComment(Comment comment) Use this to store additional information to this node.final NodeNode.setLineComment(String comment) Use this to store additional information to this node.Node.setParentNode(Node newParentNode) Assign a new parent to this node, removing it from the list of children of the previous parent, if any.Node.setParsed(Node.Parsedness parsed) Used by the parser to flag unparsable nodes.Node.setTokenRange(TokenRange tokenRange) Methods in com.github.javaparser.ast that return types with arguments of type NodeModifier and TypeMethodDescriptionNode.findByRange(Range range) Node.getChildNodes()Contains all nodes that have this node set as their parent.Node.getParentNode()NodeList.getParentNode()Node.stream()Make a stream of nodes using pre-order traversal.Node.stream(Node.TreeTraversal traversal) Make a stream of nodes using traversal algorithm "traversal".Methods in com.github.javaparser.ast with parameters of type NodeModifier and TypeMethodDescriptionbooleanNode.isAncestorOf(Node descendant) Determines whether this node is an ancestor of the given node.NodeList.nodeList(X... nodes) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanTry to replace this node in the parent with the supplied node.booleanbooleanprotected voidNode.setAsParentNodeOf(Node childNode) Node.setParentNode(Node newParentNode) Assign a new parent to this node, removing it from the list of children of the previous parent, if any.NodeList.setParentNode(Node parentNode) Sets the parentNodeMethod parameters in com.github.javaparser.ast with type arguments of type NodeModifier and TypeMethodDescription<T> Optional<T> Node.findFirst(Node.TreeTraversal traversal, Function<Node, Optional<T>> consumer) Walks the AST, applying the function for every node, with traversal algorithm "traversal".protected voidNode.setAsParentNodeOf(NodeList<? extends Node> list) voidNode.walk(Node.TreeTraversal traversal, Consumer<Node> consumer) Walks the AST, calling the consumer for every node, with traversal algorithm "traversal".voidWalks the AST, calling the consumer for every node with pre-order traversal.Constructors in com.github.javaparser.ast with parameters of type NodeModifierConstructorDescriptionBreadthFirstIterator(Node node) DirectChildrenIterator(Node node) ParentsVisitor(Node node) PostOrderIterator(Node root) PreOrderIterator(Node node) -
Uses of Node in com.github.javaparser.ast.body
Subclasses of Node in com.github.javaparser.ast.bodyModifier and TypeClassDescriptionclassAn annotation type declaration.@interface X { ... }classThe "int id();" in@interface X { int id(); }classBodyDeclaration<T extends BodyDeclaration<?>>Any declaration that can appear between the { and } of a class, interface, enum, or record.classCallableDeclaration<T extends CallableDeclaration<?>>Represents a declaration which is callable eg. a method or a constructor.classA definition of a class or interface.class X { ... }interface X { ... }classThe record declaration's constructorclassA constructor declaration:class X { X() { } }where X(){} is the constructor declaration.classOne of the values an enum can take.classThe declaration of an enum.enum X { ... }classThe declaration of a field in a class.classA (possibly static) initializer body.classA method declaration.classThe parameters to a method or lambda.classThe receiver parameter feature of Java.classThe record declarationclassTypeDeclaration<T extends TypeDeclaration<?>>A base class for all types of type declarations.classThe declaration of a variable.
Inint x = 14, y = 3;"int x = 14" and "int y = 3" are VariableDeclarators.Methods in com.github.javaparser.ast.body with parameters of type NodeModifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean -
Uses of Node in com.github.javaparser.ast.comments
Subclasses of Node in com.github.javaparser.ast.commentsModifier and TypeClassDescriptionclassAST node that represent block comments.classAbstract class for all AST nodes that represent comments.classA Javadoc comment.classAST node that represent line comments.Methods in com.github.javaparser.ast.comments that return NodeMethods in com.github.javaparser.ast.comments that return types with arguments of type NodeMethods in com.github.javaparser.ast.comments with parameters of type NodeModifier and TypeMethodDescriptionComment.setCommentedNode(Node commentedNode) Sets the commentedNode -
Uses of Node in com.github.javaparser.ast.expr
Subclasses of Node in com.github.javaparser.ast.exprModifier and TypeClassDescriptionclassA base class for the different types of annotations.classArray brackets [] being used to get a value from an array.classnew int[5][4][][]ornew int[][]{{1},{2,3}}.classThe initialization of an array.classAn assignment expression.classAn expression with an expression on the left, an expression on the right, and an operator in the middle.classThe boolean literals.classA typecast.classA literal character.classDefines an expression that accesses the class of a type.classThe ternary conditional expression.classA float or a double constant.classAn expression between ( ).classA base class for all expressions.classAccess of a field of an object or a class.classThe instanceof statementclassAll ways to specify an int literal.classA lambda expressionclassA base class for all literal expressions.classAny literal value that is stored internally as a String.classAll ways to specify a long literal.classAn annotation that uses only the annotation type name.classA value for a member of an annotation.classA method call on an object or a class.classMethod reference expressions introduced in Java 8 specifically designed to simplify lambda Expressions.classA name that may consist of multiple identifiers.classWhenever a SimpleName is used in an expression, it is wrapped in NameExpr.classAn annotation that has zero or more key-value pairs.@Mapping(a=5, d=10)classA literal "null".classA constructor call.classPattern Matching in JavaclassRecord PatternsclassA name that consists of a single identifier.classAn annotation that has a single value.classA literal string.classAn occurrence of the "super" keyword.classThe switch expressionclassA text blockclassAn occurrence of the "this" keyword.classThis class is just instantiated as scopes for MethodReferenceExpr nodes to encapsulate Types.classThe instanceof statementclassAn expression where an operator is applied to a single expression.classA declaration of variables.Fields in com.github.javaparser.ast.expr with type parameters of type NodeMethods in com.github.javaparser.ast.expr with parameters of type NodeModifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean -
Uses of Node in com.github.javaparser.ast.modules
Subclasses of Node in com.github.javaparser.ast.modulesModifier and TypeClassDescriptionclassA Java 9 Jigsaw module declaration.classA module directive.classAn exports directive in module-info.java.classAn opens directive in module-info.java.classA provides directive in module-info.java.classA require directive in module-info.java.classA uses directive in module-info.java.Methods in com.github.javaparser.ast.modules with parameters of type NodeModifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean -
Uses of Node in com.github.javaparser.ast.nodeTypes
Classes in com.github.javaparser.ast.nodeTypes with type parameters of type NodeModifier and TypeInterfaceDescriptioninterfaceNodeWithAnnotations<N extends Node>A node that can be annotated.interfaceNodeWithArguments<N extends Node>A node with arguments.interfaceNodeWithBlockStmt<N extends Node>A node with a body that is a BlockStmt.interfaceNodeWithBody<N extends Node>interfaceNodeWithCondition<N extends Node>interfaceNodeWithExpression<N extends Node>A node that has an expression in it.interfaceNodeWithExtends<N extends Node>A node that explicitly extends other types, using theextendskeyword.interfaceNodeWithIdentifier<N extends Node>interfaceNodeWithImplements<N extends Node>A node that implements other types.interfaceNodeWithJavadoc<N extends Node>A node that can be documented with a Javadoc comment.interfaceNodeWithMembers<N extends Node>A node having members.interfaceNodeWithModifiers<N extends Node>A Node with Modifiers.interfaceNodeWithName<N extends Node>A node with a (qualified) name.interfaceNodeWithOptionalBlockStmt<N extends Node>A node with a body that is a BlockStmt, which is optional.interfaceNodeWithOptionalLabel<T extends Node>A node that has an optional label.interfaceNodeWithOptionalScope<N extends Node>Represents a node which has an optional scope expression eg. method calls (object.method()).interfaceNodeWithParameters<N extends Node>interfaceNodeWithScope<N extends Node>Represents a node which has a required scope expression eg. field access (object.method).interfaceNodeWithSimpleName<N extends Node>A node with a name.interfaceNodeWithStatements<N extends Node>A node that contains a list of statements.interfaceNodeWithThrownExceptions<N extends Node>A node that declares the types of exception it throws.interfaceNodeWithType<N extends Node, T extends Type>A node with a type.interfaceNodeWithTypeArguments<N extends Node>A node that can have type arguments.interfaceNodeWithTypeParameters<N extends Node>A node that can have type parameters.interfaceNodeWithVariables<N extends Node>A node which has a list of variables.Methods in com.github.javaparser.ast.nodeTypes that return NodeMethods in com.github.javaparser.ast.nodeTypes with parameters of type NodeModifier and TypeMethodDescriptiondefault booleanNodeWithRange.containsWithin(Node other) Deprecated.useNodeWithRange.containsWithinRange(Node)instead.default booleanNodeWithRange.containsWithinRange(Node other) Checks whether the range of the givenNodeis contained within the range of thisNodeWithRange.booleanboolean -
Uses of Node in com.github.javaparser.ast.nodeTypes.modifiers
Classes in com.github.javaparser.ast.nodeTypes.modifiers with type parameters of type NodeModifier and TypeInterfaceDescriptioninterfaceNodeWithAbstractModifier<N extends Node>A node that can be abstract.interfaceNodeWithAccessModifiers<N extends Node>A node that can be public, protected, and/or private.interfaceNodeWithFinalModifier<N extends Node>A node that can be final.interfaceNodeWithPrivateModifier<N extends Node>A node that can be private.interfaceNodeWithProtectedModifier<N extends Node>A node that can be protected.interfaceNodeWithPublicModifier<N extends Node>A node that can be public.interfaceNodeWithStaticModifier<N extends Node>A node that can be static.interfaceNodeWithStrictfpModifier<N extends Node>A node that can be strictfp. -
Uses of Node in com.github.javaparser.ast.observer
Methods in com.github.javaparser.ast.observer that return NodeMethods in com.github.javaparser.ast.observer that return types with arguments of type NodeMethods in com.github.javaparser.ast.observer with parameters of type NodeModifier and TypeMethodDescriptionvoidPropagatingAstObserver.concreteListChange(NodeList<?> observedNode, AstObserver.ListChangeType type, int index, Node nodeAddedOrRemoved) voidPropagatingAstObserver.concreteListReplacement(NodeList<?> observedNode, int index, Node oldValue, Node newValue) voidPropagatingAstObserver.concretePropertyChange(Node observedNode, ObservableProperty property, Object oldValue, Object newValue) ObservableProperty.getRawValue(Node node) ObservableProperty.getValueAsBooleanAttribute(Node node) Collection<?> ObservableProperty.getValueAsCollection(Node node) ObservableProperty.getValueAsMultipleReference(Node node) ObservableProperty.getValueAsSingleReference(Node node) ObservableProperty.getValueAsStringAttribute(Node node) booleanbooleanObservableProperty.isNullOrEmpty(Node node) booleanObservableProperty.isNullOrNotPresent(Node node) voidAstObserver.listChange(NodeList<?> observedNode, AstObserver.ListChangeType type, int index, Node nodeAddedOrRemoved) A list is changedvoidAstObserverAdapter.listChange(NodeList<?> observedNode, AstObserver.ListChangeType type, int index, Node nodeAddedOrRemoved) final voidPropagatingAstObserver.listChange(NodeList<?> observedNode, AstObserver.ListChangeType type, int index, Node nodeAddedOrRemoved) voidAstObserver.listReplacement(NodeList<?> observedNode, int index, Node oldNode, Node newNode) voidAstObserverAdapter.listReplacement(NodeList<?> observedNode, int index, Node oldNode, Node newNode) voidPropagatingAstObserver.listReplacement(NodeList<?> observedNode, int index, Node oldNode, Node newNode) voidAstObserver.parentChange(Node observedNode, Node previousParent, Node newParent) The parent of a node is changedvoidAstObserverAdapter.parentChange(Node observedNode, Node previousParent, Node newParent) voidPropagatingAstObserver.parentChange(Node observedNode, Node previousParent, Node newParent) voidAstObserver.propertyChange(Node observedNode, ObservableProperty property, Object oldValue, Object newValue) The value of a property is changedvoidAstObserverAdapter.propertyChange(Node observedNode, ObservableProperty property, Object oldValue, Object newValue) final voidPropagatingAstObserver.propertyChange(Node observedNode, ObservableProperty property, Object oldValue, Object newValue) -
Uses of Node in com.github.javaparser.ast.stmt
Subclasses of Node in com.github.javaparser.ast.stmtModifier and TypeClassDescriptionclassA usage of the keyword "assert"
Inassert dead : "Wasn't expecting to be dead here";the check is "dead" and the message is the string.classStatements in between { and }.classThe break statementclassThe catch part of a try-catch-finally.classA continue statement with an optional label;continue brains;continue;classA do-while.classAn empty statement is a ";" where a statement is expected.classA call to super or this in a constructor or initializer.classUsed to wrap an expression so that it can take the place of a statement.classA for-each statement.classThe classic for statementclassAn if-then-else statement.classA statement that is labeled, likelabel123: println("continuing");classA class declaration inside a method.classA record declaration inside a method.classThe return statement, with an optional expression to return.classA base class for all statements.classOne case in a switch statementclassThe switch statementclassUsage of the synchronized keyword.classUsage of the throw statement.classThe try statementclassA statement that had parse errors.classA while statement.classThe yield statementMethods in com.github.javaparser.ast.stmt with parameters of type NodeModifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean -
Uses of Node in com.github.javaparser.ast.type
Subclasses of Node in com.github.javaparser.ast.typeModifier and TypeClassDescriptionclassTo indicate that a type is an array, it gets wrapped in an ArrayType for every array level it has.classA class or an interface type.classRepresents a set of types.classA primitive type.classBase class for reference types.classBase class for types.classA type parameter.classThe union typeclassAn unknown parameter type object.classA type called "var" waiting for Java to infer it.classThe return type of aMethodDeclarationwhen it returns void.classA wildcard type argument.Methods in com.github.javaparser.ast.type with parameters of type NodeModifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean -
Uses of Node in com.github.javaparser.ast.validator
Classes in com.github.javaparser.ast.validator with type parameters of type NodeModifier and TypeClassDescriptionclassSimpleValidator<N extends Node>Runs a validator on all nodes of a certain type, and adds a problem for all nodes that pass a condition.classSingleNodeTypeValidator<N extends Node>Runs a validator on all nodes of a certain type.interfaceTypedValidator<N extends Node>A validator that validates a known node type.Subinterfaces with type arguments of type Node in com.github.javaparser.ast.validatorModifier and TypeInterfaceDescriptioninterfaceA validator that can be run on a node to check for semantic errors.Methods in com.github.javaparser.ast.validator with parameters of type NodeModifier and TypeMethodDescriptionvoidSingleNodeTypeValidator.accept(Node node, ProblemReporter problemReporter) final voidTreeVisitorValidator.accept(Node node, ProblemReporter reporter) voidValidator.accept(Node node, ProblemReporter problemReporter) voidValidators.accept(Node node, ProblemReporter problemReporter) voidVisitorValidator.accept(Node node, ProblemReporter problemReporter) -
Uses of Node in com.github.javaparser.ast.validator.postprocessors
Method parameters in com.github.javaparser.ast.validator.postprocessors with type arguments of type NodeModifier and TypeMethodDescriptionvoidPostProcessors.postProcess(ParseResult<? extends Node> result, ParserConfiguration configuration) -
Uses of Node in com.github.javaparser.ast.visitor
Fields in com.github.javaparser.ast.visitor with type parameters of type NodeModifier and TypeFieldDescriptionstatic BiFunction<Node, Range, Boolean> NodeFinderVisitor.fConveringNodeMethods in com.github.javaparser.ast.visitor with type parameters of type NodeMethods in com.github.javaparser.ast.visitor that return NodeModifier and TypeMethodDescriptionNodeFinderVisitor.getSelectedNode()Returns the covering node.CloneVisitor.visit(ImportDeclaration n, Object arg) ModifierVisitor.visit(ImportDeclaration n, A arg) Methods in com.github.javaparser.ast.visitor with parameters of type NodeModifier and TypeMethodDescriptionGenericVisitorWithDefaults.defaultAction(Node n, A arg) This will be called by every node visit method that is not overridden.voidVoidVisitorWithDefaults.defaultAction(Node n, A arg) This will be called by every node visit method that is not overridden.static booleanstatic booleanstatic booleanstatic intstatic intstatic intabstract voidProcess the given node.voidTreeVisitor.visitBreadthFirst(Node node) https://en.wikipedia.org/wiki/Breadth-first_searchvoidTreeVisitor.visitDirectChildren(Node node) Performs a simple traversal over all nodes that have the passed node as their parent.voidTreeVisitor.visitLeavesFirst(Node node) voidTreeVisitor.visitPostOrder(Node node) Performs a post-order node traversal starting with a given node.voidTreeVisitor.visitPreOrder(Node node) Performs a pre-order node traversal starting with a given node.Constructor parameters in com.github.javaparser.ast.visitor with type arguments of type Node -
Uses of Node in com.github.javaparser.metamodel
Methods in com.github.javaparser.metamodel that return NodeModifier and TypeMethodDescriptionCreates a new node of this type.Methods in com.github.javaparser.metamodel that return types with arguments of type NodeMethods in com.github.javaparser.metamodel with parameters of type NodeModifier and TypeMethodDescriptionIntrospects the node to get the value from this field.Method parameters in com.github.javaparser.metamodel with type arguments of type NodeModifier and TypeMethodDescriptionbooleanbooleanConstructor parameters in com.github.javaparser.metamodel with type arguments of type NodeModifierConstructorDescriptionprotectedAnnotationExprMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) BaseNodeMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedBodyDeclarationMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedCallableDeclarationMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedCommentMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedExpressionMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedLiteralExprMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedLiteralStringValueExprMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedModuleDirectiveMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedNodeMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedPatternExprMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedReferenceTypeMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedStatementMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedTypeDeclarationMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) protectedTypeMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard) -
Uses of Node in com.github.javaparser.printer
Methods in com.github.javaparser.printer with parameters of type NodeModifier and TypeMethodDescriptionstatic StringConcreteSyntaxModel.genericPrettyPrint(Node node) static voidConcreteSyntaxModel.genericPrettyPrint(Node node, SourcePrinter printer) voidDotPrinter.output(Node node, String parentNodeName, String name, StringBuilder builder) Generate a xml string for given AST Node.voidXmlPrinter.output(Node node, String name, int level, StringBuilder builder) Deprecated.voidYamlPrinter.output(Node node, String name, int level, StringBuilder builder) voidXmlPrinter.outputDocument(Node node, String name, Writer writer) Output the XML Document representing given AST node to given writer.voidXmlPrinter.outputDocument(Node node, String name, XMLStreamWriter xmlWriter) Output the XML Document representing an AST node to given XMLStreamWriter.voidXmlPrinter.outputNode(Node node, String name, XMLStreamWriter xmlWriter) Output the XML Element representing an AST node to given writer.Deprecated.static voidstatic voidXmlPrinter.stringWriterOutput(Node node, String name) Create a string writer filled with XML document representing an AST node.Method parameters in com.github.javaparser.printer with type arguments of type Node -
Uses of Node in com.github.javaparser.printer.concretesyntaxmodel
Methods in com.github.javaparser.printer.concretesyntaxmodel with parameters of type NodeModifier and TypeMethodDescriptionintCsmAttribute.getTokenType(Node node, String text, String tokenText) Obtain the token type corresponding to the specific value of the attribute.voidCsmAttribute.prettyPrint(Node node, SourcePrinter printer) voidCsmChar.prettyPrint(Node node, SourcePrinter printer) voidCsmComment.prettyPrint(Node node, SourcePrinter printer) voidCsmConditional.prettyPrint(Node node, SourcePrinter printer) voidCsmElement.prettyPrint(Node node, SourcePrinter printer) voidCsmIndent.prettyPrint(Node node, SourcePrinter printer) voidCsmList.prettyPrint(Node node, SourcePrinter printer) voidCsmMix.prettyPrint(Node node, SourcePrinter printer) voidCsmNone.prettyPrint(Node node, SourcePrinter printer) voidCsmOrphanCommentsEnding.prettyPrint(Node node, SourcePrinter printer) voidCsmSequence.prettyPrint(Node node, SourcePrinter printer) voidCsmSingleReference.prettyPrint(Node node, SourcePrinter printer) voidCsmString.prettyPrint(Node node, SourcePrinter printer) voidCsmTextBlock.prettyPrint(Node node, SourcePrinter printer) voidCsmToken.prettyPrint(Node node, SourcePrinter printer) voidCsmUnindent.prettyPrint(Node node, SourcePrinter printer) -
Uses of Node in com.github.javaparser.printer.lexicalpreservation
Methods in com.github.javaparser.printer.lexicalpreservation with type parameters of type NodeModifier and TypeMethodDescriptionstatic <N extends Node>
NLexicalPreservingPrinter.setup(N node) Prepares the node so it can be used in the print methods.Methods in com.github.javaparser.printer.lexicalpreservation that return NodeMethods in com.github.javaparser.printer.lexicalpreservation with parameters of type NodeModifier and TypeMethodDescriptionstatic booleanLexicalPreservingPrinter.isAvailableOn(Node node) booleanstatic StringPrint a Node into a String, preserving the lexical information.Method parameters in com.github.javaparser.printer.lexicalpreservation with type arguments of type NodeModifier and TypeMethodDescriptionbooleanChildTextElement.isChildOfClass(Class<? extends Node> nodeClass) abstract booleanTextElement.isChildOfClass(Class<? extends Node> nodeClass) Is this TextElement representing a child of the given class?booleanTokenTextElement.isChildOfClass(Class<? extends Node> nodeClass) -
Uses of Node in com.github.javaparser.printer.lexicalpreservation.changes
Methods in com.github.javaparser.printer.lexicalpreservation.changes with parameters of type NodeModifier and TypeMethodDescriptiondefault booleanChange.evaluate(CsmConditional csmConditional, Node node) Change.getValue(ObservableProperty property, Node node) ListAdditionChange.getValue(ObservableProperty property, Node node) ListRemovalChange.getValue(ObservableProperty property, Node node) ListReplacementChange.getValue(ObservableProperty property, Node node) NoChange.getValue(ObservableProperty property, Node node) PropertyChange.getValue(ObservableProperty property, Node node) Constructors in com.github.javaparser.printer.lexicalpreservation.changes with parameters of type NodeModifierConstructorDescriptionListAdditionChange(ObservableProperty observableProperty, int index, Node nodeAdded) ListReplacementChange(ObservableProperty observableProperty, int index, Node newValue) -
Uses of Node in com.github.javaparser.resolution
Methods in com.github.javaparser.resolution with type parameters of type NodeModifier and TypeMethodDescriptionstatic <N extends Node>
NNavigator.demandNodeOfGivenClass(Node node, Class<N> clazz) static <N extends Node>
NNavigator.findNodeOfGivenClass(Node node, Class<N> clazz) Deprecated.<N extends Node>
NContext.getWrappedNode()Returns the node wrapped in the contextMethods in com.github.javaparser.resolution that return NodeModifier and TypeMethodDescriptionstatic NodeNavigator.demandParentNode(Node node) static NodeNavigator.demandParentNode(Node node, Predicate<Node> isAcceptedParentNode) Traverses the parent chain starting atnodeand returns the first Node that returns makeisAcceptedParentNodeevaluate totrue.static NodeNavigator.requireParentNode(Node node) Deprecated.Methods in com.github.javaparser.resolution with parameters of type NodeModifier and TypeMethodDescriptionstatic <N extends Node>
NNavigator.demandNodeOfGivenClass(Node node, Class<N> clazz) static NodeNavigator.demandParentNode(Node node) static NodeNavigator.demandParentNode(Node node, Predicate<Node> isAcceptedParentNode) Traverses the parent chain starting atnodeand returns the first Node that returns makeisAcceptedParentNodeevaluate totrue.static SwitchStmtNavigator.demandSwitch(Node node) static Optional<VariableDeclarator> Navigator.demandVariableDeclaration(Node node, String name) default List<ResolvedFieldDeclaration> Context.fieldsExposedToChild(Node child) The fields that are declared and in this immediate context made visible to a given child.static Optional<MethodCallExpr> Navigator.findMethodCall(Node node, String methodName) Navigator.findNameExpression(Node node, String name) static <N extends Node>
NNavigator.findNodeOfGivenClass(Node node, Class<N> clazz) Deprecated.static Optional<SimpleName> Navigator.findSimpleName(Node node, String name) static SwitchStmtNavigator.findSwitch(Node node) Deprecated.default List<VariableDeclarator> Context.localVariablesExposedToChild(Node child) The local variables that are declared in this immediate context and made visible to a given child.Context.parametersExposedToChild(Node child) The parameters that are declared in this immediate context and made visible to a given child.static NodeNavigator.requireParentNode(Node node) Deprecated.<T> TSymbolResolver.resolveDeclaration(Node node, Class<T> resultClass) For a reference it would find the corresponding declaration.Solver.solveMethod(String methodName, List<ResolvedType> argumentsTypes, Node node) SymbolReference<? extends ResolvedValueDeclaration> Solver.solveSymbol(String name, Node node) Solver.solveSymbolAsValue(String name, Node node) SymbolReference<? extends ResolvedTypeDeclaration> SymbolResolver.toTypeDeclaration(Node node) For a node it would find the corresponding reference type declaration.default List<TypePatternExpr> Context.typePatternExprsExposedToChild(Node child) The pattern expressions that are declared in this immediate context and made visible to a given child.Method parameters in com.github.javaparser.resolution with type arguments of type NodeModifier and TypeMethodDescriptionstatic NodeNavigator.demandParentNode(Node node, Predicate<Node> isAcceptedParentNode) Traverses the parent chain starting atnodeand returns the first Node that returns makeisAcceptedParentNodeevaluate totrue. -
Uses of Node in com.github.javaparser.resolution.declarations
Methods in com.github.javaparser.resolution.declarations with type parameters of type NodeModifier and TypeMethodDescriptionIf the declaration is associated to an AST node and the type matches the expectedClassreturn it, otherwise it returns empty.Methods in com.github.javaparser.resolution.declarations that return types with arguments of type Node -
Uses of Node in com.github.javaparser.symbolsolver
Methods in com.github.javaparser.symbolsolver with parameters of type NodeModifier and TypeMethodDescription<T> TJavaSymbolSolver.resolveDeclaration(Node node, Class<T> resultClass) JavaSymbolSolver.toTypeDeclaration(Node node) -
Uses of Node in com.github.javaparser.symbolsolver.javaparsermodel
Methods in com.github.javaparser.symbolsolver.javaparsermodel that return NodeModifier and TypeMethodDescriptionprotected NodeJavaParserFacade.findContainingTypeDeclOrObjectCreationExpr(Node node) Where a node has an interface/class/enum declaration -- or an object creation expression (anonymous inner class) -- as its ancestor, return the nearest one.protected NodeJavaParserFacade.findContainingTypeDeclOrObjectCreationExpr(Node node, String className) Where a node has an interface/class/enum declaration -- or an object creation expression in an inner class references an outer class -- as its ancestor, return the declaration corresponding to the class name specified.Methods in com.github.javaparser.symbolsolver.javaparsermodel with parameters of type NodeModifier and TypeMethodDescriptionNormalCompletionVisitor.defaultAction(Node n, Void unused) PatternVariableVisitor.defaultAction(Node node, Void unused) protected TypeDeclaration<?> JavaParserFacade.findContainingTypeDecl(Node node) Where a node has an interface/class/enum declaration as its ancestor, return the nearest one.protected NodeJavaParserFacade.findContainingTypeDeclOrObjectCreationExpr(Node node) Where a node has an interface/class/enum declaration -- or an object creation expression (anonymous inner class) -- as its ancestor, return the nearest one.protected NodeJavaParserFacade.findContainingTypeDeclOrObjectCreationExpr(Node node, String className) Where a node has an interface/class/enum declaration -- or an object creation expression in an inner class references an outer class -- as its ancestor, return the declaration corresponding to the class name specified.protected ResolvedTypeJavaParserFacade.getBinaryTypeConcrete(Node left, Node right, boolean solveLambdas, BinaryExpr.Operator operator) static ContextJavaParserFactory.getContext(Node node, TypeSolver typeSolver) static SymbolDeclaratorJavaParserFactory.getSymbolDeclarator(Node node, TypeSolver typeSolver) Get the type associated with the node.JavaParserFacade.getTypeDeclaration(Node node) JavaParserFacade.getTypeOfThisIn(Node node) "this" inserted in the given point, which type would have? -
Uses of Node in com.github.javaparser.symbolsolver.javaparsermodel.contexts
Classes in com.github.javaparser.symbolsolver.javaparsermodel.contexts with type parameters of type NodeModifier and TypeClassDescriptionclassAbstractJavaParserContext<N extends Node>classAbstractMethodLikeDeclarationContext<T extends Node & NodeWithParameters<T> & NodeWithTypeParameters<T>>Fields in com.github.javaparser.symbolsolver.javaparsermodel.contexts declared as NodeMethods in com.github.javaparser.symbolsolver.javaparsermodel.contexts that return NodeMethods in com.github.javaparser.symbolsolver.javaparsermodel.contexts with parameters of type NodeModifier and TypeMethodDescriptionClassOrInterfaceDeclarationContext.fieldsExposedToChild(Node child) CompilationUnitContext.fieldsExposedToChild(Node child) RecordDeclarationContext.fieldsExposedToChild(Node child) SymbolReference<? extends ResolvedValueDeclaration> AbstractJavaParserContext.findExposedPatternInParentContext(Node parent, String name) protected NodeBlockStmtContext.localVariablesExposedToChild(Node child) CatchClauseContext.localVariablesExposedToChild(Node child) ForEachStatementContext.localVariablesExposedToChild(Node child) ForStatementContext.localVariablesExposedToChild(Node child) TryWithResourceContext.localVariablesExposedToChild(Node child) VariableDeclarationExprContext.localVariablesExposedToChild(Node child) VariableDeclaratorContext.localVariablesExposedToChild(Node child) CatchClauseContext.parametersExposedToChild(Node child) ConstructorContext.parametersExposedToChild(Node child) LambdaExprContext.parametersExposedToChild(Node child) MethodContext.parametersExposedToChild(Node child) BinaryExprContext.typePatternExprsExposedToChild(Node child) BlockStmtContext.typePatternExprsExposedToChild(Node child) The following rule applies to a block statement S contained in a block that is not a switch block: - A pattern variable introduced by S is definitely matched at all the block statements following S, if any, in the block.ConditionalExprContext.typePatternExprsExposedToChild(Node child) The following rules apply to a conditional expression a ?ForStatementContext.typePatternExprsExposedToChild(Node child) The following rules apply to a basic for statement: - A pattern variable introduced by the condition expression when true is definitely matched at both the incrementation part and the contained statement.IfStatementContext.typePatternExprsExposedToChild(Node child) The following rules apply to a statement if (e) S: - A pattern variable introduced by e when true is definitely matched at S.SwitchEntryContext.typePatternExprsExposedToChild(Node child) WhileStatementContext.typePatternExprsExposedToChild(Node child) The following rules apply to a statement while (e) S: - A pattern variable introduced by e when true is definitely matched at S. -
Uses of Node in com.github.javaparser.symbolsolver.javaparsermodel.declarations
Classes in com.github.javaparser.symbolsolver.javaparsermodel.declarations with type parameters of type NodeModifier and TypeClassDescriptionclassJavaParserTypeAdapter<T extends Node & NodeWithSimpleName<T> & NodeWithMembers<T> & NodeWithAnnotations<T>>Methods in com.github.javaparser.symbolsolver.javaparsermodel.declarations with type parameters of type NodeModifier and TypeMethodDescriptionJavaParserAnonymousClassDeclaration.findMembersOfKind(Class<T> memberClass) Methods in com.github.javaparser.symbolsolver.javaparsermodel.declarations that return types with arguments of type NodeModifier and TypeMethodDescriptionJavaParserAnnotationDeclaration.toAst()JavaParserAnnotationMemberDeclaration.toAst()JavaParserAnonymousClassDeclaration.toAst()JavaParserClassDeclaration.toAst()JavaParserConstructorDeclaration.toAst()JavaParserEnumConstantDeclaration.toAst()JavaParserEnumDeclaration.toAst()JavaParserEnumDeclaration.ValueOfMethod.toAst()JavaParserEnumDeclaration.ValuesMethod.toAst()JavaParserFieldDeclaration.toAst()JavaParserInterfaceDeclaration.toAst()JavaParserMethodDeclaration.toAst()JavaParserParameterDeclaration.toAst()JavaParserRecordDeclaration.ImplicitGetterMethod.toAst()JavaParserRecordDeclaration.toAst()JavaParserTypeParameter.toAst()JavaParserTypePatternDeclaration.toAst()JavaParserTypeVariableDeclaration.toAst()JavaParserVariableDeclaration.toAst()Methods in com.github.javaparser.symbolsolver.javaparsermodel.declarations with parameters of type NodeModifier and TypeMethodDescription -
Uses of Node in com.github.javaparser.symbolsolver.javaparsermodel.declarators
Classes in com.github.javaparser.symbolsolver.javaparsermodel.declarators with type parameters of type NodeModifier and TypeClassDescriptionclassAbstractSymbolDeclarator<N extends Node>classNoSymbolDeclarator<N extends Node>Fields in com.github.javaparser.symbolsolver.javaparsermodel.declarators declared as Node -
Uses of Node in com.github.javaparser.symbolsolver.javassistmodel
Methods in com.github.javaparser.symbolsolver.javassistmodel with parameters of type NodeModifier and TypeMethodDescription -
Uses of Node in com.github.javaparser.symbolsolver.reflectionmodel
Methods in com.github.javaparser.symbolsolver.reflectionmodel that return types with arguments of type NodeMethods in com.github.javaparser.symbolsolver.reflectionmodel with parameters of type NodeModifier and TypeMethodDescription -
Uses of Node in com.github.javaparser.symbolsolver.resolution
Methods in com.github.javaparser.symbolsolver.resolution with parameters of type NodeModifier and TypeMethodDescriptionSymbolSolver.solveMethod(String methodName, List<ResolvedType> argumentsTypes, Node node) SymbolReference<? extends ResolvedValueDeclaration> SymbolSolver.solveSymbol(String name, Node node) SymbolSolver.solveSymbolAsValue(String name, Node node) SymbolReference<? extends ResolvedTypeDeclaration> -
Uses of Node in com.github.javaparser.symbolsolver.resolution.naming
Methods in com.github.javaparser.symbolsolver.resolution.naming with parameters of type NodeModifier and TypeMethodDescriptionstatic NameCategoryNameLogic.classifyReference(Node name, TypeSolver typeSolver) static NameRoleNameLogic.classifyRole(Node name) What is the Role of the given name?static booleanDoes the Node represent a Name?static booleanNameLogic.isQualifiedName(Node node) Is the given node a qualified name?static booleanNameLogic.isSimpleName(Node node) Is the given node a non-qualified name?static StringNameLogic.nameAsString(Node name) Return the string representation of the namestatic NameCategoryNameLogic.syntacticClassificationAccordingToContext(Node name) See JLS 6.5.1 Syntactic Classification of a Name According to Context. -
Uses of Node in com.github.javaparser.utils
Classes in com.github.javaparser.utils with type parameters of type NodeModifier and TypeClassDescriptionclassVisitorList<N extends Node>A list that overrides the equals and hashcode calculation of the added nodes by using another equals and hashcode visitor for those methods.classVisitorMap<N extends Node, V>A map that overrides the equals and hashcode calculation of the added nodes by using another equals and hashcode visitor for those methods.classVisitorSet<N extends Node>A set that overrides the equals and hashcode calculation of the added nodes by using another equals and hashcode visitor for those methods.Methods in com.github.javaparser.utils with type parameters of type NodeModifier and TypeMethodDescriptionstatic <T extends Node>
voidPositionUtils.sortByBeginPosition(NodeList<T> nodes) static <T extends Node>
voidPositionUtils.sortByBeginPosition(List<T> nodes) static <T extends Node>
voidPositionUtils.sortByBeginPosition(List<T> nodes, boolean ignoringAnnotations) Methods in com.github.javaparser.utils with parameters of type NodeModifier and TypeMethodDescriptionstatic booleanPositionUtils.areInOrder(Node a, Node b) static booleanPositionUtils.areInOrder(Node a, Node b, boolean ignoringAnnotations) static AnnotationExprPositionUtils.getLastAnnotation(Node node) static booleanUtils.hasUnaryMinusAsParent(Node n) Checks, if the parent is a unary expression with a minus operator.static booleanPositionUtils.nodeContains(Node container, Node other, boolean ignoringAnnotations) Compare the position of two nodes.
Node.findAll(Class)but be aware that findAll also considers the initial node.