public class JsonStructureType extends JsonSchemaType
FIELD_FILE_URL, FROM_SOURCE_METHOD
Constructor and Description |
---|
JsonStructureType(JsonSchemaType parent,
manifold.api.fs.IFile source,
String name,
TypeAttributes attr) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(String name,
IJsonParentType type) |
void |
addMember(String name,
IJsonType type,
Token token) |
void |
addRequiredWithTokens(Object withTokens)
Keeping tokens so we can verify named required property exists during resolve()
|
boolean |
addSourcePositionAnnotation(StringBuilder sb,
int indent,
String name) |
void |
addSuper(IJsonType superType) |
boolean |
equals(Object o) |
boolean |
equalsStructurally(IJsonType o)
JSon Schema types normally compare by identity, however for
some use-cases we still need to compare them structurally e.g.,
for merging types.
|
IJsonType |
findChild(String name) |
Map<String,IJsonParentType> |
getInnerTypes() |
protected Map<String,Token> |
getMemberLocations() |
Map<String,IJsonType> |
getMembers() |
int |
hashCode() |
boolean |
isRequired(String name) |
protected JsonEnumType |
makeEnumType(Collection<? extends IJsonType> types) |
IJsonType |
merge(IJsonType that) |
void |
render(AbstractJsonTypeManifold tm,
StringBuilder sb,
int indent,
boolean mutable) |
protected void |
resolveRefsImpl() |
String |
toString() |
addActualNameAnnotation, addActualNameAnnotation, addFromSourceMethod, addIssue, addRequestMethods, addSourcePositionAnnotation, addTypeReferenceAnnotation, copyWithAttributes, getActualFqn, getConstituentQn, getConstituentQn, getConstituentQnComponent, getDefinitions, getErrorHandler, getFile, getFqn, getFqn, getIdentifier, getIFile, getIssues, getLabel, getLocation, getModule, getName, getParent, getPropertyType, getPropertyType, getTm, getToken, getTypeAttributes, indent, isCollapsedUnionEnum, isParentRoot, isSchemaType, isSyntheticSchema, makeIdentifier, makeMemberIdentifier, makeTypeParameter, mergeInnerTypes, prepareToRender, removeGenerics, renderFileField, renderFileField, renderInner, resolveRefs, setDefinitions, setJsonSchema, setParent, setSyntheticSchema, setTm, setToken
public JsonStructureType(JsonSchemaType parent, manifold.api.fs.IFile source, String name, TypeAttributes attr)
protected void resolveRefsImpl()
resolveRefsImpl
in class JsonSchemaType
public void addSuper(IJsonType superType)
public void addChild(String name, IJsonParentType type)
public Map<String,IJsonParentType> getInnerTypes()
public void render(AbstractJsonTypeManifold tm, StringBuilder sb, int indent, boolean mutable)
protected JsonEnumType makeEnumType(Collection<? extends IJsonType> types)
public boolean addSourcePositionAnnotation(StringBuilder sb, int indent, String name)
public boolean equalsStructurally(IJsonType o)
IJsonType
public boolean isRequired(String name)
public void addRequiredWithTokens(Object withTokens)
public boolean equals(Object o)
equals
in class JsonSchemaType
public int hashCode()
hashCode
in class JsonSchemaType
Copyright © 2024. All rights reserved.