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