public class DefaultObjectKeyType extends BaseMetadataType implements ObjectKeyType
annotations, BASE_REFLECTION_FIELDS| Constructor and Description |
|---|
DefaultObjectKeyType(Optional<QName> name,
Optional<Pattern> pattern,
Collection<AttributeFieldType> attributes,
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.
|
boolean |
equals(Object o) |
Collection<AttributeFieldType> |
getAttributes()
All the attributes of this key
|
Optional<String> |
getLabel() |
QName |
getName()
The name of the key if it is a named key else throws a NoSuchElementException.
|
Pattern |
getPattern()
The pattern of the key if it is a pattern based key else throws a NoSuchElementException.
|
Field[] |
getReflectionComparableFields()
A list of the fields that define the identity of this class.
|
int |
hashCode() |
boolean |
isName()
Return if the this is a named key or not
|
boolean |
isPattern()
Return if the this is a pattern key or not.
|
String |
toString() |
getAnnotation, getAnnotations, getDescription, getMetadataFormatclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAnnotation, getAnnotations, getDescription, getMetadataFormatpublic DefaultObjectKeyType(Optional<QName> name, Optional<Pattern> pattern, Collection<AttributeFieldType> attributes, MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> extensions)
public QName getName()
ObjectKeyTypegetName in interface ObjectKeyTypepublic boolean isName()
ObjectKeyTypeisName in interface ObjectKeyTypeTrue if it is a named keypublic Pattern getPattern()
ObjectKeyTypegetPattern in interface ObjectKeyTypepublic boolean isPattern()
ObjectKeyTypeisPattern in interface ObjectKeyTypeTrue if it is a pattern keypublic Collection<AttributeFieldType> getAttributes()
ObjectKeyTypegetAttributes in interface ObjectKeyTypepublic void accept(MetadataTypeVisitor visitor)
MetadataTypevisitObject(ObjectType objectType) will be called when this type is an ObjectType.accept in interface MetadataTypevisitor - The visitorpublic String toString()
toString in class BaseMetadataTypepublic boolean equals(Object o)
equals in class BaseMetadataTypepublic int hashCode()
hashCode in class BaseMetadataTypepublic 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 ReflectionAwareComparablegetReflectionComparableFields in class BaseMetadataTypeCopyright © 2022 MuleSoft, Inc.. All rights reserved.