Interface JavaFile
- 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"
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The definition for a builder for an instance of an implementation ofJavaFile
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
Returns a new builder that is initialised with thisJavaFile
instance.Creates aJavaFileObject
from this instance ofJavaFile
.toString()
void
Writes thisJavaFile
instance to the given target folder as a UTF-8 file, using the standard directory structure for the packages.void
writeTo
(Appendable out) Writes thisJavaFile
instance to the givenAppendable
.void
Writes thisJavaFile
instance to the given target folder as a UTF-8 file, using the standard directory structure for the packages.void
WritesJavaFile
instance to the givenFiler
instance.
-
Method Details
-
equals
-
hashCode
int hashCode() -
toBuilder
Returns a new builder that is initialised with thisJavaFile
instance.- Returns:
- The new builder.
-
toJavaFileObject
Creates aJavaFileObject
from this instance ofJavaFile
.- Returns:
- The
JavaFileObject
.
-
toString
-
writeTo
Writes thisJavaFile
instance to the givenAppendable
.- Parameters:
out
- The output target.- Throws:
IOException
- A problem occurred when writing to the output target.
-
writeTo
Writes thisJavaFile
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
WritesJavaFile
instance to the givenFiler
instance.- Parameters:
filer
- The target.- Throws:
IOException
- A problem occurred when writing to the output target.
-
writeTo
Writes thisJavaFile
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.
-