Interface JavaUnit


public interface JavaUnit
A JavaUnit represents a Java compilation unit. The source range for this type is ordinarily the entire source file.
Author:
George Gastaldi
  • Method Details

    • getGoverningType

      <T extends JavaType<?>> T getGoverningType()
      A type in the source file governs the declaration environment such as 'package' and 'import' information.
      Returns:
      basically the first element of getTopLevelTypes()
    • getTopLevelTypes

      List<JavaType<?>> getTopLevelTypes()
      Returns:
      an immutable List of JavaType objects in the top-level of source code in the declared order.
    • toUnformattedString

      String toUnformattedString()
      Return the generated code without any formatting.