public class JsonStructureType extends JsonSchemaType
| Constructor and Description |
|---|
JsonStructureType(JsonSchemaType parent,
URL source,
String name,
TypeAttributes attr) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
addActualNameAnnotation(StringBuilder sb,
int indent,
String name,
boolean capitalize) |
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) |
protected boolean |
addSourcePositionAnnotation(StringBuilder sb,
int indent,
String name,
Token token) |
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) |
String |
getFqn() |
Map<String,IJsonParentType> |
getInnerTypes() |
protected Map<String,Token> |
getMemberLocations() |
Map<String,IJsonType> |
getMembers() |
Token |
getToken() |
int |
hashCode() |
protected void |
indent(StringBuilder sb,
int indent) |
boolean |
isRequired(String name) |
protected JsonEnumType |
makeEnumType(Collection<? extends IJsonType> types) |
IJsonType |
merge(IJsonType that) |
void |
render(StringBuilder sb,
int indent,
boolean mutable) |
protected void |
renderFileField(StringBuilder sb,
int indent,
String modifiers) |
protected void |
resolveRefsImpl() |
void |
setToken(Token token) |
String |
toString() |
addIssue, copyWithAttributes, getDefinitions, getFile, getIdentifier, getIssues, getLabel, getName, getParent, getTypeAttributes, isParentRoot, isSchemaType, mergeInnerTypes, resolveRefs, setDefinitions, setJsonSchema, setParentpublic JsonStructureType(JsonSchemaType parent, URL source, String name, TypeAttributes attr)
protected void resolveRefsImpl()
resolveRefsImpl in class JsonSchemaTypepublic String getFqn()
getFqn in class JsonSchemaTypepublic void addSuper(IJsonType superType)
public void addChild(String name, IJsonParentType type)
public Map<String,IJsonParentType> getInnerTypes()
public Token getToken()
public void setToken(Token token)
public void render(StringBuilder sb, int indent, boolean mutable)
protected JsonEnumType makeEnumType(Collection<? extends IJsonType> types)
protected void renderFileField(StringBuilder sb, int indent, String modifiers)
protected String addActualNameAnnotation(StringBuilder sb, int indent, String name, boolean capitalize)
public boolean addSourcePositionAnnotation(StringBuilder sb, int indent, String name)
protected boolean addSourcePositionAnnotation(StringBuilder sb, int indent, String name, Token token)
protected void indent(StringBuilder sb, int indent)
public boolean equalsStructurally(IJsonType o)
IJsonTypepublic boolean isRequired(String name)
public void addRequiredWithTokens(Object withTokens)
public boolean equals(Object o)
equals in class JsonSchemaTypepublic int hashCode()
hashCode in class JsonSchemaTypeCopyright © 2019. All rights reserved.