| 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)
JSourcescreateSourceFile in interface JSourcespackageName - the package name of the source filefileName - the source file name (excluding .java suffix)public JPackageInfoFile createPackageInfoFile(java.lang.String packageName)
JSourcespackage-info.java file.createPackageInfoFile in interface JSourcespackageName - the package namepublic void writeSources()
throws java.io.IOException
JSourceswriteSources in interface JSourcesjava.io.IOException - if a write operation fails