public class DefaultObjectKeyType extends BaseMetadataType implements ObjectKeyType
annotations
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.
|
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.
|
boolean |
isName()
Return if the this is a named key or not
|
boolean |
isPattern()
Return if the this is a pattern key or not.
|
equals, getAnnotation, getAnnotations, getDescription, getMetadataFormat, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAnnotation, getAnnotations, getDescription, getMetadataFormat
public DefaultObjectKeyType(Optional<QName> name, Optional<Pattern> pattern, Collection<AttributeFieldType> attributes, MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> extensions)
public QName getName()
ObjectKeyType
getName
in interface ObjectKeyType
public boolean isName()
ObjectKeyType
isName
in interface ObjectKeyType
True
if it is a named keypublic Pattern getPattern()
ObjectKeyType
getPattern
in interface ObjectKeyType
public boolean isPattern()
ObjectKeyType
isPattern
in interface ObjectKeyType
True
if it is a pattern keypublic Collection<AttributeFieldType> getAttributes()
ObjectKeyType
getAttributes
in interface ObjectKeyType
public void accept(MetadataTypeVisitor visitor)
MetadataType
visitObject(ObjectType objectType)
will be called when this type is an ObjectType.accept
in interface MetadataType
visitor
- The visitorCopyright © 2018. All rights reserved.