public final class ExtensionMetadataTypeUtils extends Object
MetadataType| Modifier and Type | Method and Description |
|---|---|
static boolean |
acceptsReferences(org.mule.metadata.api.model.MetadataType metadataType) |
static boolean |
allowsInlineDefinition(org.mule.metadata.api.model.MetadataType type) |
static boolean |
allowsReferences(org.mule.metadata.api.model.MetadataType type) |
static boolean |
allowsTopLevelDefinition(org.mule.metadata.api.model.MetadataType type) |
static String |
getAlias(org.mule.metadata.api.model.MetadataType metadataType) |
static String |
getAlias(org.mule.metadata.api.model.MetadataType metadataType,
String defaultName) |
static String |
getAlias(org.mule.metadata.api.model.ObjectFieldType fieldType) |
static Optional<DslBaseType> |
getBaseType(org.mule.metadata.api.model.MetadataType metadataType) |
static org.mule.runtime.api.meta.ExpressionSupport |
getExpressionSupport(org.mule.metadata.api.model.MetadataType metadataType)
Checks the given
metadataType for the ExpressionSupportAnnotation. |
static Optional<String> |
getId(org.mule.metadata.api.model.MetadataType metadataType) |
static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> |
getLayoutModel(org.mule.metadata.api.model.MetadataType metadataType) |
static Optional<SubstitutionGroup> |
getSubstitutionGroup(org.mule.metadata.api.model.MetadataType metadataType) |
static <T> Optional<Class<T>> |
getType(org.mule.metadata.api.model.MetadataType metadataType) |
static <T> Optional<Class<T>> |
getType(org.mule.metadata.api.model.MetadataType metadataType,
ClassLoader classloader) |
static boolean |
isBasic(org.mule.metadata.api.model.MetadataType metadataType) |
static boolean |
isFinal(org.mule.metadata.api.model.MetadataType metadataType) |
static boolean |
isFlattenedParameterGroup(org.mule.metadata.api.model.MetadataType type) |
static boolean |
isInfrastructure(org.mule.metadata.api.model.MetadataType type)
Returns true if the type is an infrastructure type, false otherwise.
|
static boolean |
isJavaCollection(org.mule.metadata.api.model.MetadataType metadataType)
Returns a
Boolean indicating whether the given MetadataType is a Java Collection or not. |
static boolean |
isMap(org.mule.metadata.api.model.MetadataType metadataType) |
static boolean |
isTypedValue(org.mule.metadata.api.model.MetadataType metadataType) |
static org.mule.metadata.api.model.MetadataFormat |
toMetadataFormat(org.mule.runtime.api.metadata.MediaType mediaType)
Returns a
MetadataFormat which represents the given mediaType. |
public static <T> Optional<Class<T>> getType(org.mule.metadata.api.model.MetadataType metadataType)
metadataType - the ObjectType who's type is requiredtype of the given ObjectType if one exists in the current classloader,
Optional.empty() otherwise.public static <T> Optional<Class<T>> getType(org.mule.metadata.api.model.MetadataType metadataType, ClassLoader classloader)
metadataType - the ObjectType who's type is requiredclassloader - the ClassLoader to use when looking for the Classtype of the given ObjectType if one exists in the current classloader,
Optional.empty() otherwise.public static String getAlias(org.mule.metadata.api.model.ObjectFieldType fieldType)
fieldType - the ObjectFieldType to inspect to retrieve its type AliasAlias name of the ObjectFieldTypepublic static String getAlias(org.mule.metadata.api.model.MetadataType metadataType)
metadataType - the MetadataType to inspect to retrieve its type AliasAlias name of the MetadataTypepublic static String getAlias(org.mule.metadata.api.model.MetadataType metadataType, String defaultName)
metadataType - the MetadataType to inspect to retrieve its type AliasdefaultName - default name to use if metadataType alias is not definedAlias name of the MetadataType or the defaultName if alias was not specifiedpublic static boolean isFinal(org.mule.metadata.api.model.MetadataType metadataType)
public static boolean isMap(org.mule.metadata.api.model.MetadataType metadataType)
metadataType - the MetadataType to inspectmetadataType represents a Map or notpublic static boolean isFlattenedParameterGroup(org.mule.metadata.api.model.MetadataType type)
true if the type is marked as a FlattenedTypepublic static boolean allowsInlineDefinition(org.mule.metadata.api.model.MetadataType type)
true if the given MetadataType should support inline definition as child elementpublic static boolean allowsTopLevelDefinition(org.mule.metadata.api.model.MetadataType type)
MetadataType should support being defined as a top level elementpublic static boolean allowsReferences(org.mule.metadata.api.model.MetadataType type)
MetadataType should support registry referencespublic static org.mule.runtime.api.meta.ExpressionSupport getExpressionSupport(org.mule.metadata.api.model.MetadataType metadataType)
metadataType for the ExpressionSupportAnnotation.
If present, the ExpressionSupportAnnotation.getExpressionSupport()
value is returned. Otherwise, it defaults to ExpressionSupport.SUPPORTED
metadataType - a MetadataTypeExpressionSupportpublic static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> getLayoutModel(org.mule.metadata.api.model.MetadataType metadataType)
metadataType - a type modelLayoutModel if the metadataType contains layout informationpublic static boolean isInfrastructure(org.mule.metadata.api.model.MetadataType type)
type - the type to checkpublic static boolean acceptsReferences(org.mule.metadata.api.model.MetadataType metadataType)
metadataType - a type modelmetadataType accept being referenced topublic static boolean isBasic(org.mule.metadata.api.model.MetadataType metadataType)
public static Optional<SubstitutionGroup> getSubstitutionGroup(org.mule.metadata.api.model.MetadataType metadataType)
metadataType - Optional.empty() if not present.public static Optional<DslBaseType> getBaseType(org.mule.metadata.api.model.MetadataType metadataType)
metadataType - public static org.mule.metadata.api.model.MetadataFormat toMetadataFormat(org.mule.runtime.api.metadata.MediaType mediaType)
MetadataFormat which represents the given mediaType.
If the mediaType matches any of the well known formats, then it will return one of those.
Otherwise, a new MetadataFormat will be created and returnedmediaType - a MediaTypeMetadataFormatpublic static boolean isJavaCollection(org.mule.metadata.api.model.MetadataType metadataType)
Boolean indicating whether the given MetadataType is a Java Collection or not.metadataType - MetadataType to introspectbooleanpublic static boolean isTypedValue(org.mule.metadata.api.model.MetadataType metadataType)
true if the given MetadataType is representing the generic of a TypedValueCopyright © 2019 MuleSoft, Inc.. All rights reserved.