Interface Expression

All Superinterfaces:
J, org.openrewrite.Tree
All Known Subinterfaces:
MethodCall
All Known Implementing Classes:
J.AnnotatedType, J.Annotation, J.ArrayAccess, J.ArrayType, J.Assignment, J.AssignmentOperation, J.Binary, J.ControlParentheses, J.Empty, J.FieldAccess, J.Identifier, J.InstanceOf, J.Lambda, J.Literal, J.MemberReference, J.MethodInvocation, J.NewArray, J.NewClass, J.ParameterizedType, J.Parentheses, J.Primitive, J.Ternary, J.TypeCast, J.Unary, J.Wildcard

public interface Expression extends J
  • Method Details

    • getType

      @Nullable @Nullable JavaType getType()
    • withType

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

      default List<J> getSideEffects()
      Returns:
      A list of the side effects emitted by the statement, if the statement was decomposed. So for a binary operation, there are up to two potential side effects (the left and right side) and as few as zero if both sides of the expression are something like constants or variable references.
    • getCoordinates