Class Cs.Constructor

java.lang.Object
org.openrewrite.csharp.tree.Cs.Constructor
All Implemented Interfaces:
Cs, org.openrewrite.java.tree.J, org.openrewrite.java.tree.Statement, org.openrewrite.Tree
Enclosing interface:
Cs

public static class Cs.Constructor extends Object implements Cs, org.openrewrite.java.tree.Statement
Represents a C# constructor declaration which may include an optional constructor initializer.

For example:

   // Constructor with no initializer
   public MyClass() {
   }

   // Constructor with base class initializer
   public MyClass(int x) : base(x) {
   }

   // Constructor with this initializer
   public MyClass(string s) : this(int.Parse(s)) {
   }
 
  • Constructor Details

    • Constructor

      public Constructor()
  • Method Details

    • acceptCSharp

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

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