public abstract class BaseMetadataType extends Object implements MetadataType
Modifier and Type | Field and Description |
---|---|
protected Map<Class<? extends TypeAnnotation>,TypeAnnotation> |
annotations |
Constructor and Description |
---|
BaseMetadataType(MetadataFormat metadataFormat,
Map<Class<? extends TypeAnnotation>,TypeAnnotation> annotations) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
<T extends TypeAnnotation> |
getAnnotation(Class<T> extension)
Returns an
Optional with the annotation of a given type. |
Set<TypeAnnotation> |
getAnnotations()
Returns all the annotations of the type.
|
Optional<String> |
getDescription()
Returns the description if specified.
|
MetadataFormat |
getMetadataFormat()
Return the format of the underlying type system where this type was
mapped from.
|
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept
protected final Map<Class<? extends TypeAnnotation>,TypeAnnotation> annotations
public BaseMetadataType(MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> annotations)
public Set<TypeAnnotation> getAnnotations()
MetadataType
getAnnotations
in interface MetadataType
public MetadataFormat getMetadataFormat()
MetadataType
getMetadataFormat
in interface MetadataType
public <T extends TypeAnnotation> Optional<T> getAnnotation(Class<T> extension)
MetadataType
Optional
with the annotation of a given type.getAnnotation
in interface MetadataType
extension
- The type of annotationOptional
with the matched annotation. Optional.empty()
if the annotation was not present.public Optional<String> getDescription()
MetadataType
getDescription
in interface MetadataType
Copyright © 2018. All rights reserved.