Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,AbstractJClassDef> |
classes |
private java.util.List<ImplJSourceFile> |
classFiles |
private JFiler |
filer |
private FormatPreferences |
format |
private java.util.Map<AbstractJClassDef,java.lang.String> |
qualifiedNames |
Constructor and Description |
---|
ImplJSources(JFiler filer,
FormatPreferences format) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addClassDef(java.lang.String qualifiedName,
AbstractJClassDef classDef) |
JPackageInfoFile |
createPackageInfoFile(java.lang.String packageName)
Create a
package-info.java file. |
JSourceFile |
createSourceFile(java.lang.String packageName,
java.lang.String fileName)
Create a source file.
|
(package private) boolean |
hasClass(java.lang.String qualifiedName) |
(package private) java.lang.String |
qualifiedNameOf(AbstractJClassDef classDef) |
void |
writeSources()
Write the source files.
|
private final JFiler filer
private final FormatPreferences format
private final java.util.List<ImplJSourceFile> classFiles
private final java.util.Map<java.lang.String,AbstractJClassDef> classes
private final java.util.Map<AbstractJClassDef,java.lang.String> qualifiedNames
ImplJSources(JFiler filer, FormatPreferences format)
void addClassDef(java.lang.String qualifiedName, AbstractJClassDef classDef)
boolean hasClass(java.lang.String qualifiedName)
java.lang.String qualifiedNameOf(AbstractJClassDef classDef)
public JSourceFile createSourceFile(java.lang.String packageName, java.lang.String fileName)
JSources
createSourceFile
in interface JSources
packageName
- the package name of the source filefileName
- the source file name (excluding .java
suffix)public JPackageInfoFile createPackageInfoFile(java.lang.String packageName)
JSources
package-info.java
file.createPackageInfoFile
in interface JSources
packageName
- the package namepublic void writeSources() throws java.io.IOException
JSources
writeSources
in interface JSources
java.io.IOException
- if a write operation fails