Module PrintAst
Provides queries to pretty-print a Java AST as a graph.
By default, this will print the AST for all elements in the database. To change this behavior,
extend PrintAstConfiguration
and override shouldPrint
to hold for only the elements
you wish to view the AST for.
Import path
import semmle.code.java.PrintAst
Imports
java | Provides all default Java QL imports. |
Predicates
edges | Holds if |
graphProperties | Holds if property |
nodes | Holds if |
Classes
AnnotationPartNode | A node representing an |
AnnotationsNode | A node representing the annotations of an |
BaseTypesNode | A node representing the base types of a |
CallableNode | A node representing a |
ClassInstanceExprNode | A node representing a |
ClassInterfaceNode | A node representing a |
CompilationUnitNode | A node representing a |
DocumentableNode | A node representing the documentation of a |
ElementNode | A node representing an AST node with an underlying |
ExprStmtNode | A node representing an |
FieldDeclNode | A node representing a |
ForInitNode | A node representing the initializers of a |
ForStmtNode | A node representing a |
GenericCallableNode | A node representing the type parameters of a |
GenericTypeNode | A node representing the type parameters of a |
ImportNode | A node representing an |
ImportsNode | A node representing the |
JavadocElementNode | A node representing a |
JavadocNode | A node representing a |
KtInitializerNode | A node representing a |
LocalTypeDeclStmtNode | A node representing a |
LocalVarDeclExprNode | A node representing a |
LocalVarDeclSynthNode | A synthetic node holding a |
ParameterNode | A node representing a |
ParametersNode | A node representing the parameters of a |
PatternCaseNode | A node representing a |
PrintAstConfiguration | The query can extend this class to control which elements are printed. |
PrintAstNode | A node in the output tree. |
RegExpTermNode | A node representing a regular expression term. |
SingleLocalVarDeclParentNode | A node representing an element that can be the parent of up to one |
StringLiteralNode | A node representing a |
TopLevelPrintAstNode | A top-level AST node. |
TypeVariableNode | A node representing a |
Aliases
RegexTreeView | Provides a class hierarchy corresponding to a parse tree of regular expressions. |