Class Cs.CompilationUnit

java.lang.Object
org.openrewrite.csharp.tree.Cs.CompilationUnit
All Implemented Interfaces:
Cs, org.openrewrite.java.tree.J, org.openrewrite.java.tree.JavaSourceFile, org.openrewrite.SourceFile, org.openrewrite.Tree
Enclosing interface:
Cs

public static final class Cs.CompilationUnit extends Object implements Cs, org.openrewrite.java.tree.JavaSourceFile
  • Constructor Details

    • CompilationUnit

      public CompilationUnit()
  • Method Details

    • getCharset

      public Charset getCharset()
      Specified by:
      getCharset in interface org.openrewrite.SourceFile
    • withCharset

      public org.openrewrite.SourceFile withCharset(Charset charset)
      Specified by:
      withCharset in interface org.openrewrite.SourceFile
    • getPackageDeclaration

      public @Nullable org.openrewrite.java.tree.J.Package getPackageDeclaration()
      Specified by:
      getPackageDeclaration in interface org.openrewrite.java.tree.JavaSourceFile
    • withPackageDeclaration

      public Cs.CompilationUnit withPackageDeclaration(org.openrewrite.java.tree.J.Package packageDeclaration)
      Specified by:
      withPackageDeclaration in interface org.openrewrite.java.tree.JavaSourceFile
    • getExterns

      public List<Cs.ExternAlias> getExterns()
    • withExterns

      public Cs.CompilationUnit withExterns(List<Cs.ExternAlias> externs)
    • getUsings

      public List<Cs.UsingDirective> getUsings()
    • withUsings

      public Cs.CompilationUnit withUsings(List<Cs.UsingDirective> usings)
    • getMembers

      public List<org.openrewrite.java.tree.Statement> getMembers()
    • withMembers

      public Cs.CompilationUnit withMembers(List<org.openrewrite.java.tree.Statement> members)
    • getImports

      public List<org.openrewrite.java.tree.J.Import> getImports()
      Specified by:
      getImports in interface org.openrewrite.java.tree.JavaSourceFile
    • withImports

      public Cs.CompilationUnit withImports(List<org.openrewrite.java.tree.J.Import> imports)
      Specified by:
      withImports in interface org.openrewrite.java.tree.JavaSourceFile
    • getClasses

      public List<org.openrewrite.java.tree.J.ClassDeclaration> getClasses()
      Specified by:
      getClasses in interface org.openrewrite.java.tree.JavaSourceFile
    • withClasses

      public org.openrewrite.java.tree.JavaSourceFile withClasses(List<org.openrewrite.java.tree.J.ClassDeclaration> classes)
      Specified by:
      withClasses in interface org.openrewrite.java.tree.JavaSourceFile
    • acceptCSharp

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

      public <P> org.openrewrite.TreeVisitor<?,org.openrewrite.PrintOutputCapture<P>> printer(org.openrewrite.Cursor cursor)
      Specified by:
      printer in interface org.openrewrite.SourceFile
      Specified by:
      printer in interface org.openrewrite.Tree
    • getTypesInUse

      public org.openrewrite.java.internal.TypesInUse getTypesInUse()
      Specified by:
      getTypesInUse in interface org.openrewrite.java.tree.JavaSourceFile
    • getWeight

      public long getWeight(Predicate<Object> uniqueIdentity)
      Specified by:
      getWeight in interface org.openrewrite.SourceFile
    • getPadding

      public Cs.CompilationUnit.Padding getPadding()
      Specified by:
      getPadding in interface org.openrewrite.java.tree.JavaSourceFile
    • service

      @Incubating(since="8.2.0") public <S, T extends S> T service(Class<S> service)
      Specified by:
      service in interface org.openrewrite.java.tree.JavaSourceFile
      Specified by:
      service in interface org.openrewrite.SourceFile