Interface TypedTree

All Superinterfaces:
J, org.openrewrite.Tree
All Known Subinterfaces:
NameTree, TypeTree
All Known Implementing Classes:
J.AnnotatedType, J.ArrayAccess, J.ArrayType, J.Assignment, J.AssignmentOperation, J.Binary, J.ClassDeclaration, J.Empty, J.FieldAccess, J.Identifier, J.InstanceOf, J.Lambda, J.Literal, J.MemberReference, J.MethodDeclaration, J.MethodInvocation, J.MultiCatch, J.NewArray, J.NewClass, J.ParameterizedType, J.Primitive, J.Ternary, J.Unary, J.VariableDeclarations, J.VariableDeclarations.NamedVariable, J.Wildcard

public interface TypedTree extends J
A tree with type attribution information. Unlike TypeTree, this does not necessarily mean the tree is the name of a type. So for example, a J.MethodInvocation is a TypedTree but not a TypeTree.
  • Method Details

    • getType

      @Nullable @Nullable JavaType getType()
    • withType

      <T extends J> T withType(@Nullable @Nullable JavaType type)