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 TypeMethodDescriptionvoid
accept
(TreeVisitor visitor) void
addWarnings
(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
allTokens, firstToken, getChildren, getLine, is, isLeaf, lastToken, parent, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
imports
in interfaceCompilationUnitTree
-
types
- Specified by:
types
in interfaceCompilationUnitTree
-
warnings
-
accept
-
children
-
packageDeclaration
- Specified by:
packageDeclaration
in interfaceCompilationUnitTree
-
moduleDeclaration
Description copied from interface:CompilationUnitTree
Experimental 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:
moduleDeclaration
in interfaceCompilationUnitTree
-
eofToken
- Specified by:
eofToken
in interfaceCompilationUnitTree
-
addWarnings
-