Class ImplJSourceFile

java.lang.Object
org.jboss.jdeparser.BasicJCommentable
org.jboss.jdeparser.ImplJSourceFile
All Implemented Interfaces:
JCommentable, JSourceFile

class ImplJSourceFile extends BasicJCommentable implements JSourceFile
  • Field Details

  • Constructor Details

  • Method Details

    • add

      private <C extends ClassFileContent> C add(C item)
    • checkPackage

      private void checkPackage()
    • hasImport

      boolean hasImport(String name)
    • hasImport

      boolean hasImport(AbstractJType type)
    • hasStaticImport

      boolean hasStaticImport(String name)
    • hasStaticImport

      boolean hasStaticImport(String name, AbstractJType enclosingType)
    • _import

      public JSourceFile _import(String type)
      Description copied from interface: JSourceFile
      Add a type import to this source file.
      Specified by:
      _import in interface JSourceFile
      Parameters:
      type - the type to import
      Returns:
      this source file
    • _import

      public JSourceFile _import(JType type)
      Description copied from interface: JSourceFile
      Add a type import to this source file.
      Specified by:
      _import in interface JSourceFile
      Parameters:
      type - the type to import
      Returns:
      this source file
    • _import

      public JSourceFile _import(Class<?> type)
      Description copied from interface: JSourceFile
      Add a type import to this source file.
      Specified by:
      _import in interface JSourceFile
      Parameters:
      type - the type to import
      Returns:
      this source file
    • importStatic

      public JSourceFile importStatic(String type, String member)
      Description copied from interface: JSourceFile
      Add a static member import to this source file.
      Specified by:
      importStatic in interface JSourceFile
      Parameters:
      type - the type to import from
      member - the member name
      Returns:
      this source file
    • importStatic

      public JSourceFile importStatic(JType type, String member)
      Description copied from interface: JSourceFile
      Add a static member import to this source file.
      Specified by:
      importStatic in interface JSourceFile
      Parameters:
      type - the type to import from
      member - the member name
      Returns:
      this source file
    • importStatic

      public JSourceFile importStatic(Class<?> type, String member)
      Description copied from interface: JSourceFile
      Add a static member import to this source file.
      Specified by:
      importStatic in interface JSourceFile
      Parameters:
      type - the type to import from
      member - the member name
      Returns:
      this source file
    • blankLine

      public JSourceFile blankLine()
      Description copied from interface: JSourceFile
      Add a blank line to this source file. If sorting is enabled, blank lines may be lost.
      Specified by:
      blankLine in interface JSourceFile
      Returns:
      this source file
    • _class

      public JClassDef _class(int mods, String name)
      Description copied from interface: JSourceFile
      Add a class definition to this source file.
      Specified by:
      _class in interface JSourceFile
      Parameters:
      mods - the modifiers
      name - the class name
      Returns:
      the class definition
    • _enum

      public JClassDef _enum(int mods, String name)
      Description copied from interface: JSourceFile
      Add an enum definition to this source file.
      Specified by:
      _enum in interface JSourceFile
      Parameters:
      mods - the modifiers
      name - the enum name
      Returns:
      the enum definition
    • _interface

      public JClassDef _interface(int mods, String name)
      Description copied from interface: JSourceFile
      Add an interface definition to this source file.
      Specified by:
      _interface in interface JSourceFile
      Parameters:
      mods - the modifiers
      name - the interface name
      Returns:
      the interface definition
    • annotationInterface

      public JClassDef annotationInterface(int mods, String name)
      Description copied from interface: JSourceFile
      Add an annotation interface definition to this source file.
      Specified by:
      annotationInterface in interface JSourceFile
      Parameters:
      mods - the modifiers
      name - the annotation interface name
      Returns:
      the annotation interface definition
    • getPackageName

      String getPackageName()
    • getFileName

      String getFileName()
    • write

      void write(SourceFileWriter sourceFileWriter) throws IOException
      Throws:
      IOException
    • getSources

      ImplJSources getSources()