Package org.mule.metadata.api.model.impl
Class DefaultAttributeFieldType
- java.lang.Object
-
- org.mule.metadata.api.model.impl.BaseMetadataType
-
- org.mule.metadata.api.model.impl.DefaultAttributeFieldType
-
- All Implemented Interfaces:
AttributeFieldType,FieldsComparable,MetadataType
public class DefaultAttributeFieldType extends BaseMetadataType implements AttributeFieldType
-
-
Field Summary
-
Fields inherited from class org.mule.metadata.api.model.impl.BaseMetadataType
annotations
-
-
Constructor Summary
Constructors Constructor Description DefaultAttributeFieldType(AttributeKeyType key, MetadataType value, boolean required, MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> extensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(MetadataTypeVisitor visitor)Dispatches in a reflective way to the method with prefix "visit" with the specific type as argument.Object[]getFieldValues()A list of the fields that define the identity of this class.AttributeKeyTypegetKey()The key of the attribute.MetadataTypegetValue()The value of the attributebooleanisRequired()If this attribute is required or not.-
Methods inherited from class org.mule.metadata.api.model.impl.BaseMetadataType
equals, getAnnotation, getAnnotations, getDescription, getMetadataFormat, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.mule.metadata.api.model.MetadataType
getAnnotation, getAnnotations, getDescription, getMetadataFormat
-
-
-
-
Constructor Detail
-
DefaultAttributeFieldType
public DefaultAttributeFieldType(AttributeKeyType key, MetadataType value, boolean required, MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> extensions)
-
-
Method Detail
-
getKey
public AttributeKeyType getKey()
Description copied from interface:AttributeFieldTypeThe key of the attribute.- Specified by:
getKeyin interfaceAttributeFieldType- Returns:
- The attribute key.
-
getValue
public MetadataType getValue()
Description copied from interface:AttributeFieldTypeThe value of the attribute- Specified by:
getValuein interfaceAttributeFieldType- Returns:
- The value
-
isRequired
public boolean isRequired()
Description copied from interface:AttributeFieldTypeIf this attribute is required or not.- Specified by:
isRequiredin interfaceAttributeFieldType- Returns:
- True if required.
-
accept
public void accept(MetadataTypeVisitor visitor)
Description copied from interface:MetadataTypeDispatches in a reflective way to the method with prefix "visit" with the specific type as argument. ExamplevisitObject(ObjectType objectType)will be called when this type is an ObjectType.- Specified by:
acceptin interfaceMetadataType- Parameters:
visitor- The visitor
-
getFieldValues
public Object[] getFieldValues()
Description copied from interface:FieldsComparableA list of the fields that define the identity of this class. These fields can be used to compare if instances of a class are equal, or to generate a hash code for it.Have in mind not exposing fields of class
Pattern, for example, that only check for reference equality (If that is not the desired behaviour).- Specified by:
getFieldValuesin interfaceFieldsComparable- Overrides:
getFieldValuesin classBaseMetadataType
-
-