Package org.sonar.java.model.expression
Class NewClassTreeImpl
- java.lang.Object
-
- org.sonar.java.model.JavaTree
-
- org.sonar.java.model.AbstractTypedTree
-
- org.sonar.java.model.expression.NewClassTreeImpl
-
- All Implemented Interfaces:
ExpressionTree,NewClassTree,Tree
public class NewClassTreeImpl extends AbstractTypedTree implements NewClassTree
-
-
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 inherited from class org.sonar.java.model.AbstractTypedTree
typeBinding
-
Fields inherited from class org.sonar.java.model.JavaTree
grammarRuleKey, root
-
-
Constructor Summary
Constructors Constructor Description NewClassTreeImpl(Arguments arguments, ClassTreeImpl classBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)Argumentsarguments()Iterable<Tree>children()Creates iterable for children of this node.ClassTreeclassBody()voidcompleteWithDotToken(InternalSyntaxToken dotToken)NewClassTreeImplcompleteWithEnclosingExpression(ExpressionTree enclosingExpression)NewClassTreeImplcompleteWithIdentifier(TypeTree identifier)NewClassTreeImplcompleteWithNewKeyword(SyntaxToken newKeyword)NewClassTreeImplcompleteWithTypeArguments(TypeArgumentListTreeImpl typeArguments)SymbolconstructorSymbol()SyntaxTokendotToken()"dot" is not null only when the enclosing expression is presentExpressionTreeenclosingExpression()IdentifierTreegetConstructorIdentifier()TypeTreeidentifier()Tree.Kindkind()SyntaxTokennewKeyword()"new" keyword is null for#initializer()TypeArgumentstypeArguments()-
Methods inherited from class org.sonar.java.model.AbstractTypedTree
symbolType
-
Methods inherited from class org.sonar.java.model.JavaTree
firstToken, getChildren, getGrammarRuleKey, 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.ExpressionTree
symbolType
-
Methods inherited from interface org.sonar.plugins.java.api.tree.Tree
firstToken, is, lastToken, parent
-
-
-
-
Constructor Detail
-
NewClassTreeImpl
public NewClassTreeImpl(Arguments arguments, @Nullable ClassTreeImpl classBody)
-
-
Method Detail
-
completeWithIdentifier
public NewClassTreeImpl completeWithIdentifier(TypeTree identifier)
-
completeWithEnclosingExpression
public NewClassTreeImpl completeWithEnclosingExpression(ExpressionTree enclosingExpression)
-
completeWithNewKeyword
public NewClassTreeImpl completeWithNewKeyword(SyntaxToken newKeyword)
-
completeWithTypeArguments
public NewClassTreeImpl completeWithTypeArguments(TypeArgumentListTreeImpl typeArguments)
-
enclosingExpression
@Nullable public ExpressionTree enclosingExpression()
- Specified by:
enclosingExpressionin interfaceNewClassTree
-
typeArguments
@Nullable public TypeArguments typeArguments()
- Specified by:
typeArgumentsin interfaceNewClassTree
-
identifier
public TypeTree identifier()
- Specified by:
identifierin interfaceNewClassTree
-
arguments
public Arguments arguments()
- Specified by:
argumentsin interfaceNewClassTree
-
classBody
@Nullable public ClassTree classBody()
- Specified by:
classBodyin interfaceNewClassTree
-
accept
public void accept(TreeVisitor visitor)
-
children
public Iterable<Tree> children()
Description copied from class:JavaTreeCreates iterable for children of this node. Note that iterable may containnullelements.
-
getConstructorIdentifier
public IdentifierTree getConstructorIdentifier()
-
newKeyword
@Nullable public SyntaxToken newKeyword()
Description copied from interface:NewClassTree"new" keyword is null for#initializer()- Specified by:
newKeywordin interfaceNewClassTree
-
completeWithDotToken
public void completeWithDotToken(InternalSyntaxToken dotToken)
-
dotToken
@Nullable public SyntaxToken dotToken()
Description copied from interface:NewClassTree"dot" is not null only when the enclosing expression is present- Specified by:
dotTokenin interfaceNewClassTree
-
constructorSymbol
public Symbol constructorSymbol()
- Specified by:
constructorSymbolin interfaceNewClassTree
-
-