Class JsonDirectWriter<T extends JsonDirectWriter>
java.lang.Object
com.metaobjects.io.MetaDataWriter
com.metaobjects.generator.GeneratorIOWriter<T>
com.metaobjects.generator.direct.metadata.json.JsonDirectWriter<T>
- All Implemented Interfaces:
com.metaobjects.io.MetaDataIO
- Direct Known Subclasses:
MetaDataAIDocumentationWriter,MetaDataFileSchemaWriter
Base class for JSON direct writers.
This is the JSON equivalent of XMLDirectWriter.
-
Field Summary
Fields inherited from class com.metaobjects.generator.GeneratorIOWriter
log -
Constructor Summary
ConstructorsConstructorDescriptionJsonDirectWriter(com.metaobjects.loader.MetaDataLoader loader, OutputStream out) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected com.google.gson.GsongetGson()protected com.google.gson.JsonObjectprotected voidsetGson(com.google.gson.Gson gson) protected voidsetJsonObject(com.google.gson.JsonObject jsonObject) abstract voidprotected voidwriteJsonToStream(com.google.gson.JsonObject json, OutputStream out) Methods inherited from class com.metaobjects.generator.GeneratorIOWriter
getFilename, getFilters, getName, getToStringOptions, toString, withFilename, withFilters, withNameMethods inherited from class com.metaobjects.io.MetaDataWriter
getLoader, path
-
Constructor Details
-
JsonDirectWriter
public JsonDirectWriter(com.metaobjects.loader.MetaDataLoader loader, OutputStream out) throws GeneratorIOException - Throws:
GeneratorIOException
-
-
Method Details
-
writeJson
- Throws:
GeneratorIOException
-
setJsonObject
protected void setJsonObject(com.google.gson.JsonObject jsonObject) -
getJsonObject
- Throws:
GeneratorIOException
-
writeJsonToStream
protected void writeJsonToStream(com.google.gson.JsonObject json, OutputStream out) throws GeneratorIOException - Throws:
GeneratorIOException
-
close
- Specified by:
closein interfacecom.metaobjects.io.MetaDataIO- Specified by:
closein classGeneratorIOWriter<T extends JsonDirectWriter>- Throws:
GeneratorIOException
-
getGson
protected com.google.gson.Gson getGson() -
setGson
protected void setGson(com.google.gson.Gson gson)
-