Package org.sonar.java.model
Class JavaTree.CompilationUnitTreeImpl
java.lang.Object
org.sonar.java.model.JavaTree
org.sonar.java.model.JavaTree.CompilationUnitTreeImpl
- All Implemented Interfaces:
CompilationUnitTree,Tree
- Enclosing class:
JavaTree
public static class JavaTree.CompilationUnitTreeImpl
extends JavaTree
implements CompilationUnitTree
-
Nested Class Summary
Nested classes/interfaces inherited from class org.sonar.java.model.JavaTree
JavaTree.AnnotatedTypeTree, JavaTree.ArrayTypeTreeImpl, JavaTree.CompilationUnitTreeImpl, JavaTree.ImportTreeImpl, JavaTree.NotImplementedTreeImpl, JavaTree.PackageDeclarationTreeImpl, JavaTree.ParameterizedTypeTreeImpl, JavaTree.PrimitiveTypeTreeImpl, JavaTree.UnionTypeTreeImpl, JavaTree.WildcardTreeImpl -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompilationUnitTreeImpl(PackageDeclarationTree packageDeclaration, List<ImportClauseTree> imports, List<Tree> types, ModuleDeclarationTree moduleDeclaration, SyntaxToken eofToken) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TreeVisitor visitor) voidaddWarnings(Map<JProblem.Type, Set<JWarning>> warnings) children()Creates iterable for children of this node.eofToken()imports()kind()Experimental feature allowing retrieval of java 9 module declaration from 'module-info.java' files.types()warnings(JProblem.Type type) Methods inherited from class org.sonar.java.model.JavaTree
firstToken, getChildren, getLine, is, isLeaf, lastToken, parent, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sonar.plugins.java.api.tree.Tree
firstToken, is, lastToken, parent
-
Field Details
-
sema
-
-
Constructor Details
-
CompilationUnitTreeImpl
public CompilationUnitTreeImpl(@Nullable PackageDeclarationTree packageDeclaration, List<ImportClauseTree> imports, List<Tree> types, @Nullable ModuleDeclarationTree moduleDeclaration, SyntaxToken eofToken)
-
-
Method Details
-
kind
-
imports
- Specified by:
importsin interfaceCompilationUnitTree
-
types
- Specified by:
typesin interfaceCompilationUnitTree
-
warnings
-
accept
-
children
Description copied from class:JavaTreeCreates iterable for children of this node. Note that iterable may containnullelements. -
packageDeclaration
- Specified by:
packageDeclarationin interfaceCompilationUnitTree
-
moduleDeclaration
Description copied from interface:CompilationUnitTreeExperimental feature allowing retrieval of java 9 module declaration from 'module-info.java' files. In java 9, a new compilation unit level has been introduced, splitting current compilation units between 'Modular' and 'Ordinary' Compilation Units. In order to not introduce breaking change in API too early, and as long as java 9 is not officially released, the 'Module Declaration' part of the Java 9 'Modular Compilation Unit' will be part of the current Compilation Unit interface.- Specified by:
moduleDeclarationin interfaceCompilationUnitTree
-
eofToken
- Specified by:
eofTokenin interfaceCompilationUnitTree
-
addWarnings
-