All Known Implementing Classes:
JavaFileImpl

@ClassVersion(sourceVersion="$Id: JavaFile.java 1085 2024-01-05 16:23:28Z tquadrat $") @API(status=STABLE, since="0.0.5") public sealed interface JavaFile permits JavaFileImpl
The definition for a Java file containing a single top level class.
Author:
Square,Inc.
Modified by:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: JavaFile.java 1085 2024-01-05 16:23:28Z tquadrat $
Since:
0.0.5
UML Diagram
UML Diagram for "org.tquadrat.foundation.javacomposer.JavaFile"

UML Diagram for "org.tquadrat.foundation.javacomposer.JavaFile"

UML Diagram for "org.tquadrat.foundation.javacomposer.JavaFile"
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The definition for a builder for an instance of an implementation of JavaFile.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    int
    Returns a new builder that is initialised with this JavaFile instance.
    Creates a JavaFileObject from this instance of JavaFile.
    void
    writeTo(File directory)
    Writes this JavaFile instance to the given target folder as a UTF-8 file, using the standard directory structure for the packages.
    void
    Writes this JavaFile instance to the given Appendable.
    void
    writeTo(Path directory)
    Writes this JavaFile instance to the given target folder as a UTF-8 file, using the standard directory structure for the packages.
    void
    writeTo(Filer filer)
    Writes JavaFile instance to the given Filer instance.
  • Method Details

    • equals

      boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • toBuilder

      Returns a new builder that is initialised with this JavaFile instance.
      Returns:
      The new builder.
    • toJavaFileObject

      Creates a JavaFileObject from this instance of JavaFile.
      Returns:
      The JavaFileObject.
    • toString

      Overrides:
      toString in class Object
    • writeTo

      void writeTo(Appendable out) throws IOException
      Writes this JavaFile instance to the given Appendable.
      Parameters:
      out - The output target.
      Throws:
      IOException - A problem occurred when writing to the output target.
    • writeTo

      void writeTo(File directory) throws IOException
      Writes this JavaFile instance to the given target folder as a UTF-8 file, using the standard directory structure for the packages.
      Parameters:
      directory - The target folder.
      Throws:
      IOException - A problem occurred when writing to the output target.
    • writeTo

      void writeTo(Filer filer) throws IOException
      Writes JavaFile instance to the given Filer instance.
      Parameters:
      filer - The target.
      Throws:
      IOException - A problem occurred when writing to the output target.
    • writeTo

      void writeTo(Path directory) throws IOException
      Writes this JavaFile instance to the given target folder as a UTF-8 file, using the standard directory structure for the packages.
      Parameters:
      directory - The target folder.
      Throws:
      IOException - A problem occurred when writing to the output target.