public class DefaultObjectType extends BaseMetadataType implements ObjectType
annotations
Constructor and Description |
---|
DefaultObjectType(Collection<ObjectFieldType> fields,
boolean ordered,
MetadataType openRestriction,
MetadataFormat metadataFormat,
Map<Class<? extends TypeAnnotation>,TypeAnnotation> extensions) |
Modifier and Type | Method and Description |
---|---|
void |
accept(MetadataTypeVisitor visitor)
Dispatches in a reflective way to the method with prefix "visit" with the specific type as argument.
|
Optional<ObjectFieldType> |
getFieldByName(String propertyName)
Searches a field that matches the specified name
|
Collection<ObjectFieldType> |
getFields()
The collection of all the fields
|
Optional<MetadataType> |
getOpenRestriction()
Returns the restriction if any specified for the open type.
|
boolean |
isOrdered()
If the list of fields must respect the order or not
|
String |
toString() |
equals, getAnnotation, getAnnotations, getDescription, getMetadataFormat, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isOpen
getAnnotation, getAnnotations, getDescription, getMetadataFormat
public DefaultObjectType(Collection<ObjectFieldType> fields, boolean ordered, MetadataType openRestriction, MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> extensions)
public boolean isOrdered()
ObjectType
isOrdered
in interface ObjectType
public Optional<MetadataType> getOpenRestriction()
ObjectType
getOpenRestriction
in interface ObjectType
public Collection<ObjectFieldType> getFields()
ObjectType
getFields
in interface ObjectType
public Optional<ObjectFieldType> getFieldByName(String propertyName)
ObjectType
getFieldByName
in interface ObjectType
propertyName
- The name of the propertypublic void accept(MetadataTypeVisitor visitor)
MetadataType
visitObject(ObjectType objectType)
will be called when this type is an ObjectType.accept
in interface MetadataType
visitor
- The visitorpublic String toString()
toString
in class BaseMetadataType
Copyright © 2018. All rights reserved.