public abstract class AbstractAPIGenerator extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
ACTION_ENDPOINT |
protected static String |
OPTIONAL_MESSAGE |
protected static String |
OTHER_ENDPOINT |
protected static String |
VIEW_ENDPOINT |
Modifier | Constructor and Description |
---|---|
protected |
AbstractAPIGenerator(String directory)
Constructs an
AbstractAPIGenerator with the given directory. |
protected |
AbstractAPIGenerator(String directory,
boolean optional)
Constructs an
AbstractAPIGenerator with the given directory and optional state. |
protected |
AbstractAPIGenerator(String directory,
boolean optional,
ResourceBundle resourceBundle)
Constructs an
AbstractAPIGenerator with the given directory, optional state, and
ResourceBundle . |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
generateAPIFiles(ApiImplementor implementor)
Generates the API client files of the given API implementor.
|
void |
generateAPIFiles(List<ApiImplementor> implementors)
Generates the API client files of the given API implementors.
|
void |
generateCoreAPIFiles()
Generates the API client files for the core API implementors.
|
protected Path |
getDirectory()
Gets the directory where the API client files should be generated.
|
protected ResourceBundle |
getMessages()
Gets the messages for doc of the generated classes.
|
protected boolean |
isOptional()
If the API client files being generated are optional, that is, belong to an add-on.
|
protected static final String OPTIONAL_MESSAGE
protected static final String VIEW_ENDPOINT
protected static final String ACTION_ENDPOINT
protected static final String OTHER_ENDPOINT
protected AbstractAPIGenerator(String directory)
AbstractAPIGenerator
with the given directory.directory
- the directory where the API client files should be generatedprotected AbstractAPIGenerator(String directory, boolean optional)
AbstractAPIGenerator
with the given directory and optional state.directory
- the directory where the API client files should be generatedoptional
- true
if the API client files are optional, false
otherwiseprotected AbstractAPIGenerator(String directory, boolean optional, ResourceBundle resourceBundle)
AbstractAPIGenerator
with the given directory, optional state, and
ResourceBundle
.directory
- the directory where the API client files should be generatedoptional
- true
if the API client files are optional, false
otherwiseresourceBundle
- the ResourceBundle
used for doc of the generated classes.protected Path getDirectory()
protected boolean isOptional()
true
if the API client files are optional, false
otherwiseprotected ResourceBundle getMessages()
ResourceBundle
with the messages for docpublic void generateCoreAPIFiles() throws IOException
IOException
- if an error occurred while writing the API filespublic void generateAPIFiles(List<ApiImplementor> implementors) throws IOException
implementors
- the API implementors, must not be null
IOException
- if an error occurred while writing the API filesprotected abstract void generateAPIFiles(ApiImplementor implementor) throws IOException
implementor
- the API implementor, must not be null
IOException
- if an error occurred while writing the API files