Package org.sonar.java.model.expression
Class InstanceOfTreeImpl
java.lang.Object
org.sonar.java.model.JavaTree
org.sonar.java.model.AbstractTypedTree
org.sonar.java.model.expression.AssessableExpressionTree
org.sonar.java.model.expression.InstanceOfTreeImpl
- All Implemented Interfaces:
ExpressionTree
,InstanceOfTree
,PatternInstanceOfTree
,Tree
public class InstanceOfTreeImpl
extends AssessableExpressionTree
implements InstanceOfTree, PatternInstanceOfTree
-
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
-
Constructor Summary
ConstructorsConstructorDescriptionInstanceOfTreeImpl
(ExpressionTree expression, InternalSyntaxToken instanceofToken, PatternTree pattern) InstanceOfTreeImpl
(ExpressionTree expression, InternalSyntaxToken instanceofToken, TypeTree type) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(TreeVisitor visitor) children()
Creates iterable for children of this node.kind()
pattern()
Only works for PATTERN_INSTANCE_OF, mutually exclusive withtype()
type()
Only works for INSTANCE_OF, mutually exclusive withpattern()
variable()
Deprecated, will be droppedMethods inherited from class org.sonar.java.model.expression.AssessableExpressionTree
asConstant, asConstant
Methods inherited from class org.sonar.java.model.AbstractTypedTree
symbolType
Methods inherited from class org.sonar.java.model.JavaTree
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.ExpressionTree
asConstant, asConstant, symbolType
Methods inherited from interface org.sonar.plugins.java.api.tree.Tree
firstToken, is, lastToken, parent
-
Constructor Details
-
InstanceOfTreeImpl
public InstanceOfTreeImpl(ExpressionTree expression, InternalSyntaxToken instanceofToken, TypeTree type) -
InstanceOfTreeImpl
public InstanceOfTreeImpl(ExpressionTree expression, InternalSyntaxToken instanceofToken, PatternTree pattern)
-
-
Method Details
-
kind
-
expression
- Specified by:
expression
in interfaceInstanceOfTree
- Specified by:
expression
in interfacePatternInstanceOfTree
-
instanceofKeyword
- Specified by:
instanceofKeyword
in interfaceInstanceOfTree
- Specified by:
instanceofKeyword
in interfacePatternInstanceOfTree
-
type
Only works for INSTANCE_OF, mutually exclusive withpattern()
- Specified by:
type
in interfaceInstanceOfTree
-
variable
Deprecated, will be dropped- Specified by:
variable
in interfacePatternInstanceOfTree
- Returns:
- null for all patterns that are not
TypePatternTree
.
-
pattern
Only works for PATTERN_INSTANCE_OF, mutually exclusive withtype()
- Specified by:
pattern
in interfacePatternInstanceOfTree
-
accept
-
children
Description copied from class:JavaTree
Creates iterable for children of this node. Note that iterable may containnull
elements.
-