public abstract class BaseMetadataType extends Object implements MetadataType, ReflectionAwareComparable
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<? extends TypeAnnotation>,TypeAnnotation> |
annotations |
protected static Field[] |
BASE_REFLECTION_FIELDS |
| 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.
|
Field[] |
getReflectionComparableFields()
A list of the fields that define the identity of this class.
|
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitacceptprotected final Map<Class<? extends TypeAnnotation>,TypeAnnotation> annotations
protected static final Field[] BASE_REFLECTION_FIELDS
public BaseMetadataType(MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> annotations)
public Set<TypeAnnotation> getAnnotations()
MetadataTypegetAnnotations in interface MetadataTypepublic MetadataFormat getMetadataFormat()
MetadataTypegetMetadataFormat in interface MetadataTypepublic <T extends TypeAnnotation> Optional<T> getAnnotation(Class<T> extension)
MetadataTypeOptional with the annotation of a given type.getAnnotation in interface MetadataTypeextension - The type of annotationOptional with the matched annotation. Optional.empty() if the annotation was not present.public Optional<String> getDescription()
MetadataTypegetDescription in interface MetadataTypepublic Field[] getReflectionComparableFields()
ReflectionAwareComparable
Have in mind not exposing fields of class Pattern, for example, that only check for reference
equality (If that is not the desired behaviour).
getReflectionComparableFields in interface ReflectionAwareComparableCopyright © 2025 MuleSoft, Inc.. All rights reserved.