public abstract class JsonSchemaType extends java.lang.Object implements IJsonParentType, java.lang.Cloneable
Attention! subclasses must take care to share state with copies.
See the State class below.
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
FIELD_FILE_URL |
protected static java.lang.String |
FROM_SOURCE_METHOD |
| Modifier | Constructor and Description |
|---|---|
protected |
JsonSchemaType(java.lang.String name,
manifold.api.fs.IFile source,
JsonSchemaType parent,
TypeAttributes attr) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
addActualNameAnnotation(java.lang.StringBuilder sb,
int indent,
java.lang.String name,
boolean capitalize) |
protected void |
addFromSourceMethod(java.lang.StringBuilder sb,
int indent) |
void |
addIssue(JsonIssue issue) |
protected void |
addRequestMethods(java.lang.StringBuilder sb,
int indent,
java.lang.String typeName) |
protected boolean |
addSourcePositionAnnotation(java.lang.StringBuilder sb,
int indent,
java.lang.String name,
Token token) |
protected void |
addTypeReferenceAnnotation(java.lang.StringBuilder sb,
int indent,
JsonSchemaType type) |
JsonSchemaType |
copyWithAttributes(TypeAttributes attributes) |
boolean |
equals(java.lang.Object o) |
protected java.lang.String |
getActualFqn(AbstractJsonTypeManifold tm) |
protected java.lang.String |
getConstituentQn(IJsonType constituentType,
IJsonType propertyType) |
protected java.lang.String |
getConstituentQn(IJsonType constituentType,
IJsonType propertyType,
boolean param) |
protected IJsonType |
getConstituentQnComponent(IJsonType constituentType) |
java.util.List<IJsonType> |
getDefinitions() |
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> |
getErrorHandler() |
manifold.api.fs.IFile |
getFile() |
java.lang.String |
getFqn() |
protected java.lang.String |
getFqn(JsonSchemaType type) |
java.lang.String |
getIdentifier() |
protected manifold.api.fs.IFile |
getIFile() |
java.util.List<JsonIssue> |
getIssues() |
java.lang.String |
getLabel() |
javax.tools.JavaFileManager.Location |
getLocation() |
manifold.api.host.IModule |
getModule() |
java.lang.String |
getName() |
JsonSchemaType |
getParent() |
protected java.lang.String |
getPropertyType(IJsonType propertyType) |
protected java.lang.String |
getPropertyType(IJsonType propertyType,
boolean qualifiedWithMe,
boolean param) |
protected AbstractJsonTypeManifold |
getTm() |
Token |
getToken() |
TypeAttributes |
getTypeAttributes() |
int |
hashCode() |
protected void |
indent(java.lang.StringBuilder sb,
int indent) |
protected boolean |
isCollapsedUnionEnum(IJsonType type) |
protected boolean |
isParentRoot() |
protected boolean |
isSchemaType() |
protected boolean |
isSyntheticSchema() |
protected java.lang.String |
makeIdentifier(java.lang.String name,
boolean capitalize) |
protected java.lang.String |
makeMemberIdentifier(IJsonType type) |
protected java.lang.String |
makeTypeParameter(IJsonType type,
boolean qualifiedWithMe,
boolean param) |
protected boolean |
mergeInnerTypes(IJsonParentType other,
IJsonParentType mergedType,
java.util.Map<java.lang.String,IJsonParentType> innerTypes) |
void |
prepareToRender(javax.tools.JavaFileManager.Location location,
manifold.api.host.IModule module,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> errorHandler)
exclusive to top-level types (facilitates inner class extensions)
|
protected java.lang.String |
removeGenerics(java.lang.String specificPropertyType) |
protected void |
renderFileField(java.lang.StringBuilder sb,
int indent) |
protected void |
renderFileField(java.lang.StringBuilder sb,
int indent,
java.lang.String modifiers) |
void |
renderInner(AbstractJsonTypeManifold tm,
java.lang.StringBuilder sb,
int indent,
boolean mutable) |
void |
resolveRefs() |
protected void |
resolveRefsImpl() |
void |
setDefinitions(java.util.List<IJsonType> definitions) |
protected void |
setJsonSchema() |
void |
setParent(IJsonParentType parent) |
protected void |
setSyntheticSchema(boolean synthetic) |
void |
setTm(AbstractJsonTypeManifold tm) |
void |
setToken(Token token) |
clone, finalize, getClass, jailbreak, notify, notifyAll, toString, wait, wait, waitaddChild, findChild, renderequalsStructurally, mergeprotected static final java.lang.String FIELD_FILE_URL
protected static final java.lang.String FROM_SOURCE_METHOD
protected JsonSchemaType(java.lang.String name,
manifold.api.fs.IFile source,
JsonSchemaType parent,
TypeAttributes attr)
public void prepareToRender(javax.tools.JavaFileManager.Location location,
manifold.api.host.IModule module,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> errorHandler)
prepareToRender in interface IJsonParentTypepublic java.lang.String getFqn()
protected AbstractJsonTypeManifold getTm()
public void setTm(AbstractJsonTypeManifold tm)
public final void resolveRefs()
protected void resolveRefsImpl()
protected boolean isParentRoot()
public manifold.api.fs.IFile getFile()
public java.lang.String getLabel()
public java.lang.String getIdentifier()
getIdentifier in interface IJsonTypepublic Token getToken()
public void setToken(Token token)
public JsonSchemaType getParent()
public void setParent(IJsonParentType parent)
public java.util.List<IJsonType> getDefinitions()
getDefinitions in interface IJsonTypepublic void setDefinitions(java.util.List<IJsonType> definitions)
setDefinitions in interface IJsonTypeprotected boolean isSchemaType()
protected void setJsonSchema()
protected boolean isSyntheticSchema()
protected void setSyntheticSchema(boolean synthetic)
public TypeAttributes getTypeAttributes()
getTypeAttributes in interface IJsonTypepublic JsonSchemaType copyWithAttributes(TypeAttributes attributes)
copyWithAttributes in interface IJsonTypeprotected boolean mergeInnerTypes(IJsonParentType other, IJsonParentType mergedType, java.util.Map<java.lang.String,IJsonParentType> innerTypes)
public java.util.List<JsonIssue> getIssues()
getIssues in interface IJsonParentTypepublic void addIssue(JsonIssue issue)
addIssue in interface IJsonParentTypeprotected void indent(java.lang.StringBuilder sb,
int indent)
protected void addFromSourceMethod(java.lang.StringBuilder sb,
int indent)
protected void addRequestMethods(java.lang.StringBuilder sb,
int indent,
java.lang.String typeName)
protected void addTypeReferenceAnnotation(java.lang.StringBuilder sb,
int indent,
JsonSchemaType type)
protected boolean addSourcePositionAnnotation(java.lang.StringBuilder sb,
int indent,
java.lang.String name,
Token token)
protected manifold.api.fs.IFile getIFile()
protected java.lang.String addActualNameAnnotation(java.lang.StringBuilder sb,
int indent,
java.lang.String name,
boolean capitalize)
protected java.lang.String makeMemberIdentifier(IJsonType type)
protected java.lang.String makeIdentifier(java.lang.String name,
boolean capitalize)
protected void renderFileField(java.lang.StringBuilder sb,
int indent)
protected void renderFileField(java.lang.StringBuilder sb,
int indent,
java.lang.String modifiers)
protected java.lang.String getPropertyType(IJsonType propertyType)
protected java.lang.String getPropertyType(IJsonType propertyType, boolean qualifiedWithMe, boolean param)
protected java.lang.String makeTypeParameter(IJsonType type, boolean qualifiedWithMe, boolean param)
protected java.lang.String getFqn(JsonSchemaType type)
protected java.lang.String getActualFqn(AbstractJsonTypeManifold tm)
protected java.lang.String getConstituentQn(IJsonType constituentType, IJsonType propertyType)
protected java.lang.String getConstituentQn(IJsonType constituentType, IJsonType propertyType, boolean param)
protected boolean isCollapsedUnionEnum(IJsonType type)
protected java.lang.String removeGenerics(java.lang.String specificPropertyType)
public javax.tools.JavaFileManager.Location getLocation()
public manifold.api.host.IModule getModule()
public javax.tools.DiagnosticListener<javax.tools.JavaFileObject> getErrorHandler()
public void renderInner(AbstractJsonTypeManifold tm, java.lang.StringBuilder sb, int indent, boolean mutable)
renderInner in interface IJsonParentTypepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2021. All rights reserved.