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.JavaTree
grammarRuleKey
-
-
Constructor Summary
Constructors Constructor Description NewClassTreeImpl(Arguments arguments, ClassTreeImpl classBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(TreeVisitor visitor)
Arguments
arguments()
Iterable<Tree>
children()
Creates iterable for children of this node.ClassTree
classBody()
void
completeWithDotToken(InternalSyntaxToken dotToken)
NewClassTreeImpl
completeWithEnclosingExpression(ExpressionTree enclosingExpression)
NewClassTreeImpl
completeWithIdentifier(TypeTree identifier)
NewClassTreeImpl
completeWithNewKeyword(SyntaxToken newKeyword)
NewClassTreeImpl
completeWithTypeArguments(TypeArgumentListTreeImpl typeArguments)
Symbol
constructorSymbol()
SyntaxToken
dotToken()
"dot" is not null only when the enclosing expression is presentExpressionTree
enclosingExpression()
IdentifierTree
getConstructorIdentifier()
TypeTree
identifier()
Tree.Kind
kind()
SyntaxToken
newKeyword()
"new" keyword is null for#initializer()
TypeArguments
typeArguments()
-
Methods inherited from class org.sonar.java.model.AbstractTypedTree
completeMissingType, isTypeSet, setInferedType, setType, 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:
enclosingExpression
in interfaceNewClassTree
-
typeArguments
@Nullable public TypeArguments typeArguments()
- Specified by:
typeArguments
in interfaceNewClassTree
-
identifier
public TypeTree identifier()
- Specified by:
identifier
in interfaceNewClassTree
-
arguments
public Arguments arguments()
- Specified by:
arguments
in interfaceNewClassTree
-
classBody
@Nullable public ClassTree classBody()
- Specified by:
classBody
in interfaceNewClassTree
-
accept
public void accept(TreeVisitor visitor)
-
children
public Iterable<Tree> children()
Description copied from class:JavaTree
Creates iterable for children of this node. Note that iterable may containnull
elements.
-
getConstructorIdentifier
public IdentifierTree getConstructorIdentifier()
-
newKeyword
@Nullable public SyntaxToken newKeyword()
Description copied from interface:NewClassTree
"new" keyword is null for#initializer()
- Specified by:
newKeyword
in 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:
dotToken
in interfaceNewClassTree
-
constructorSymbol
public Symbol constructorSymbol()
- Specified by:
constructorSymbol
in interfaceNewClassTree
-
-