Package org.mule.metadata.api.model
Interface MetadataType
-
- All Known Subinterfaces:
AnyType,ArrayType,AttributeFieldType,AttributeKeyType,BinaryType,BooleanType,DateTimeType,DateType,FunctionType,IntersectionType,LocalDateTimeType,LocalTimeType,NothingType,NullType,NumberType,ObjectFieldType,ObjectKeyType,ObjectType,PeriodType,RegexType,SimpleType,StringType,TimeType,TimeZoneType,TupleType,TypeParameterType,UnionType,VoidType
- All Known Implementing Classes:
BaseMetadataType,DefaultAnyType,DefaultArrayType,DefaultAttributeFieldType,DefaultAttributeKeyType,DefaultBinaryType,DefaultBooleanType,DefaultDateTimeType,DefaultDateType,DefaultFunctionType,DefaultIntersectionType,DefaultLocalDateTimeType,DefaultLocalTimeType,DefaultNothingType,DefaultNullType,DefaultNumberType,DefaultObjectFieldType,DefaultObjectKeyType,DefaultObjectType,DefaultPeriodType,DefaultRegexType,DefaultStringType,DefaultTimeType,DefaultTimeZoneType,DefaultTupleType,DefaultTypeParameterType,DefaultUnionType,DefaultVoidType
@NoImplement public interface MetadataTypeBase interface for all the Types
-
-
Method Summary
All Methods Instance Methods Abstract 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.<T extends TypeAnnotation>
Optional<T>getAnnotation(Class<T> annotation)Returns anOptionalwith the annotation of a given type.Set<TypeAnnotation>getAnnotations()Returns all the annotations of the type.Optional<String>getDescription()Returns the description if specified.MetadataFormatgetMetadataFormat()Return the format of the underlying type system where this type was mapped from.
-
-
-
Method Detail
-
getMetadataFormat
MetadataFormat getMetadataFormat()
Return the format of the underlying type system where this type was mapped from. I.E XML- Returns:
- The format.
-
getAnnotation
<T extends TypeAnnotation> Optional<T> getAnnotation(Class<T> annotation)
Returns anOptionalwith the annotation of a given type.- Parameters:
annotation- The type of annotation- Returns:
Optionalwith the matched annotation.Optional.empty()if the annotation was not present.
-
getAnnotations
Set<TypeAnnotation> getAnnotations()
Returns all the annotations of the type.- Returns:
- The collection of annotations
-
getDescription
Optional<String> getDescription()
Returns the description if specified.- Returns:
- The description if any.
-
accept
void accept(MetadataTypeVisitor visitor)
Dispatches 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.- Parameters:
visitor- The visitor
-
-