Interface CompilationUnit

All Known Implementing Classes:
Interface, TopLevelClass, TopLevelEnumeration

public interface CompilationUnit
This interface describes methods common to all Java compilation units (Java classes, interfaces, and enums).
Author:
Jeff Butler
  • Method Details Link icon

    • getImportedTypes Link icon

      Set<FullyQualifiedJavaType> getImportedTypes()
    • getStaticImports Link icon

      Set<String> getStaticImports()
    • getType Link icon

    • addImportedType Link icon

      void addImportedType(FullyQualifiedJavaType importedType)
    • addImportedTypes Link icon

      void addImportedTypes(Set<FullyQualifiedJavaType> importedTypes)
    • addStaticImport Link icon

      void addStaticImport(String staticImport)
    • addStaticImports Link icon

      void addStaticImports(Set<String> staticImports)
    • addFileCommentLine Link icon

      void addFileCommentLine(String commentLine)
      Comments will be written at the top of the file as is, we do not append any start or end comment characters.

      Note that in the Eclipse plugin, file comments will not be merged.

      Parameters:
      commentLine - the comment line
    • getFileCommentLines Link icon

      List<String> getFileCommentLines()
    • accept Link icon

      <R> R accept(CompilationUnitVisitor<R> visitor)