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) |
clone, emptyArray, finalize, getClass, jailbreak, notify, notifyAll, toString, wait, wait, wait
addChild, findChild, render
equalsStructurally, merge
protected 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 IJsonParentType
public 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 IJsonType
public Token getToken()
public void setToken(Token token)
public JsonSchemaType getParent()
public void setParent(IJsonParentType parent)
public List<IJsonType> getDefinitions()
getDefinitions
in interface IJsonType
public void setDefinitions(List<IJsonType> definitions)
setDefinitions
in interface IJsonType
protected boolean isSchemaType()
protected void setJsonSchema()
protected boolean isSyntheticSchema()
protected void setSyntheticSchema(boolean synthetic)
public TypeAttributes getTypeAttributes()
getTypeAttributes
in interface IJsonType
public JsonSchemaType copyWithAttributes(TypeAttributes attributes)
copyWithAttributes
in interface IJsonType
protected boolean mergeInnerTypes(IJsonParentType other, IJsonParentType mergedType, Map<String,IJsonParentType> innerTypes)
public List<JsonIssue> getIssues()
getIssues
in interface IJsonParentType
public void addIssue(JsonIssue issue)
addIssue
in interface IJsonParentType
protected 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, 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 IJsonParentType
Copyright © 2024. All rights reserved.