- Type Parameters:
S
- The actual type of theSchema
being implemented (usually an implementedSchema
does not require any type parameters any more).
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,Object> ChildrenAccessor<Schema<S>[]>
,Schema<S>
,TypeAccessor
public abstract class AbstractSchema<S extends Schema<S>>
extends HashMap<String,Object>
implements Schema<S>
The purpose of a
AbstractSchema
is automatically generate
documentation of nested data structures.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> Nested classes/interfaces inherited from interface org.refcodes.mixin.ChildrenAccessor
ChildrenAccessor.ChildrenBuilder<T,
B extends ChildrenAccessor.ChildrenBuilder<T, B>>, ChildrenAccessor.ChildrenMutator<T>, ChildrenAccessor.ChildrenProperty<T> Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,
V extends Object> Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
TypeAccessor.TypeBuilder<T,
B extends TypeAccessor.TypeBuilder<T, B>>, TypeAccessor.TypeMutator<T>, TypeAccessor.TypeProperty<T> -
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractSchema
(Class<?> aType, String aDescription) Constructs aAbstractSchema
with the provided arguments.AbstractSchema
(Class<?> aType, String aAlias, String aDescription) Constructs aAbstractSchema
with the provided arguments.AbstractSchema
(Class<?> aType, String aAlias, String aDescription, S... aChildren) Constructs aAbstractSchema
with the provided arguments.AbstractSchema
(Class<?> aType, String aDescription, S... aChildren) Constructs aAbstractSchema
with the provided arguments.AbstractSchema
(S aSchema) Constructs aAbstractSchema
with the properties of the providedAbstractSchema
("copy constructor"),.AbstractSchema
(S aSchema, Class<?> aType) Constructs aAbstractSchema
with the provided arguments.AbstractSchema
(S aSchema, S... aChildren) Constructs aAbstractSchema
with the properties of the providedAbstractSchema
("copy constructor"),. -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
AbstractSchema
Constructs aAbstractSchema
with the provided arguments.- Parameters:
aDescription
- The description of the schema described by theAbstractSchema
providing type.aType
- The type providing the thisAbstractSchema
instance.
-
AbstractSchema
Constructs aAbstractSchema
with the provided arguments.- Parameters:
aDescription
- The description of the schema described by theAbstractSchema
providing type.aType
- The type providing the thisAbstractSchema
instance.aChildren
- The children'sAbstractSchema
descriptions representing part of theAbstractSchema
providing type.
-
AbstractSchema
Constructs aAbstractSchema
with the provided arguments.- Parameters:
aAlias
- The alias (name) of the schema described by theAbstractSchema
providing type.aDescription
- The description of the schema described by theAbstractSchema
providing type.aType
- The type providing the thisAbstractSchema
instance.aChildren
- The children'sAbstractSchema
descriptions representing part of theAbstractSchema
providing type.
-
AbstractSchema
Constructs aAbstractSchema
with the provided arguments.- Parameters:
aAlias
- The alias (name) of the schema described by theAbstractSchema
providing type.aDescription
- The description of the schema described by theAbstractSchema
providing type.aType
- The type providing the thisAbstractSchema
instance.
-
AbstractSchema
Constructs aAbstractSchema
with the properties of the providedAbstractSchema
("copy constructor"),.- Parameters:
aSchema
- TheAbstractSchema
from which to copy the attributes.
-
AbstractSchema
Constructs aAbstractSchema
with the provided arguments.- Parameters:
aSchema
- TheAbstractSchema
from which to copy the attributes.aType
- The type providing the thisAbstractSchema
instance.
-
AbstractSchema
Constructs aAbstractSchema
with the properties of the providedAbstractSchema
("copy constructor"),.- Parameters:
aSchema
- TheAbstractSchema
from which to copy the attributes.aChildren
- The children'sAbstractSchema
descriptions representing part of theAbstractSchema
providing type.
-
-
Method Details
-
getChildren
Retrieves the children from the children property.- Specified by:
getChildren
in interfaceChildrenAccessor<S extends Schema<S>>
- Specified by:
getChildren
in interfaceSchema<S extends Schema<S>>
- Returns:
- The children stored by the children property.
-
toString
- Overrides:
toString
in classAbstractMap<String,
Object>
-
toString
Hook method for converting a type to an accordingString
.- Parameters:
aValue
- The value of a given type to be converted accordingly.- Returns:
- The accordingly converted value.
-
getType
Description copied from interface:TypeAccessor
Retrieves the type property.- Specified by:
getType
in interfaceTypeAccessor<S extends Schema<S>>
- Returns:
- The type stored by the property.
-