Class Cs.SingleVariableDesignation

java.lang.Object
org.openrewrite.csharp.tree.Cs.SingleVariableDesignation
All Implemented Interfaces:
Cs, Cs.VariableDesignation, org.openrewrite.java.tree.Expression, org.openrewrite.java.tree.J, org.openrewrite.Tree
Enclosing interface:
Cs

public static final class Cs.SingleVariableDesignation extends Object implements Cs.VariableDesignation, Cs
Represents a single variable declaration within a declaration expression. Used both for simple out variable declarations and as elements within deconstruction declarations. Example in out variable:
 int.TryParse(s, out int x)  // 'int x' is the SingleVariable
 
Example in deconstruction:
 (int x, string y) = point;  // both 'int x' and 'string y' are SingleVariables
 
  • Constructor Details

    • SingleVariableDesignation

      public SingleVariableDesignation()
  • Method Details

    • acceptCSharp

      public <P> org.openrewrite.java.tree.J acceptCSharp(CSharpVisitor<P> v, P p)
      Specified by:
      acceptCSharp in interface Cs
    • getType

      public @Nullable org.openrewrite.java.tree.JavaType getType()
      Specified by:
      getType in interface org.openrewrite.java.tree.Expression
    • withType

      public Cs.SingleVariableDesignation withType(@Nullable org.openrewrite.java.tree.JavaType type)
      Specified by:
      withType in interface org.openrewrite.java.tree.Expression
    • getCoordinates

      public org.openrewrite.java.tree.CoordinateBuilder.Expression getCoordinates()
      Specified by:
      getCoordinates in interface org.openrewrite.java.tree.Expression