public final class TypeUtils extends Object
MetadataType model| 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(Field field)
Checks the given
field for the Alias annotation. |
static Collection<Field> |
getAllFields(Class<?> declaringType)
Returns all the
Fields in the given declaringType. |
static Collection<Class<?>> |
getAllSuperClasses(Class<?> type)
Returns all the superclasses of the given
type, without including
Object |
static org.mule.runtime.api.meta.ExpressionSupport |
getExpressionSupport(org.mule.metadata.api.model.MetadataType metadataType)
Checks the given
metadataType for the ExpressionSupportAnnotation. |
static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> |
getLayoutModel(org.mule.metadata.api.model.MetadataType metadataType) |
static Collection<Field> |
getParameterFields(Class<?> declaringType)
|
static org.mule.runtime.api.meta.model.parameter.ParameterRole |
getParameterRole(org.mule.metadata.api.model.MetadataType metadataType) |
static boolean |
isBasic(org.mule.metadata.api.model.MetadataType metadataType) |
static boolean |
isContent(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.
|
public static Collection<Field> getParameterFields(Class<?> declaringType)
Fields in the given declaringType which are annotated
with Parameter but also do not have the Ignore one.
The introspection also includes parent classes.
declaringType - the class to introspect.Collection of fields. May be empty but will never be nullpublic static Collection<Field> getAllFields(Class<?> declaringType)
declaringType - the class to introspect.Collection of fields. May be empty but will never be nullpublic static Collection<Class<?>> getAllSuperClasses(Class<?> type)
type, without including
Objecttype - a typepublic static String getAlias(Field field)
field for the Alias annotation. If present, Alias.value()
is returned. Otherwise, Field.getName() is returned.field - a Fieldpublic 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 org.mule.runtime.api.meta.model.parameter.ParameterRole getParameterRole(org.mule.metadata.api.model.MetadataType metadataType)
public static boolean isContent(org.mule.metadata.api.model.MetadataType type)
public 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)
Copyright © 2017 MuleSoft, Inc.. All rights reserved.