public interface TypeCatalog
types declared in a given DslResolvingContext,
defined by the Set of ExtensionModels that coexist in.
A TypeCatalog provides access to all the declared types, along with their type it mapping,
storing the relation of a given type and its declared subtypes across all the ExtensionModel
available in the context.
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsBaseType(org.mule.metadata.api.model.ObjectType type)
Type comparison will be performed first by
typeId in the context of subTypes mapping. |
Collection<org.mule.metadata.api.model.ObjectType> |
getAllBaseTypes() |
Collection<org.mule.metadata.api.model.ObjectType> |
getAllSubTypes() |
Optional<String> |
getDeclaringExtension(String typeId) |
static TypeCatalog |
getDefault(Set<ExtensionModel> extensions) |
Collection<org.mule.metadata.api.model.ObjectType> |
getExtensionTypes(String extensionName) |
Set<org.mule.metadata.api.model.ObjectType> |
getSubTypes(org.mule.metadata.api.model.ObjectType type)
|
Set<org.mule.metadata.api.model.ObjectType> |
getSuperTypes(org.mule.metadata.api.model.ObjectType type)
Returns a
Set with all the declared ObjectType that are considered super
types from the given ObjectType type. |
Optional<org.mule.metadata.api.model.ObjectType> |
getType(String typeId) |
Collection<org.mule.metadata.api.model.ObjectType> |
getTypes() |
static TypeCatalog getDefault(Set<ExtensionModel> extensions)
Optional<org.mule.metadata.api.model.ObjectType> getType(String typeId)
ObjectType with the given typeId
if one is present in this TypeCatalog, or Optional.empty()
otherwise.Collection<org.mule.metadata.api.model.ObjectType> getTypes()
Set with all the ObjectType defined
in this TypeCatalogSet<org.mule.metadata.api.model.ObjectType> getSubTypes(org.mule.metadata.api.model.ObjectType type)
Set with all the declared ObjectType subtypes
for the indicated ObjectType type.
Lookup will be performed first by typeId,
defaulting to type comparison if no typeId was found
type - the ObjectType for which to retrieve its declared subTypesSet with all the declared subtypes for the indicated ObjectTypeSet<org.mule.metadata.api.model.ObjectType> getSuperTypes(org.mule.metadata.api.model.ObjectType type)
Set with all the declared ObjectType that are considered super
types from the given ObjectType type.
The lookup will be performed by looking through all the mappings that contains the given
type as subtype in this TypeCatalog and storing the base type and
again looking the super type of the found base type.
type - ObjectType to look for their super typesSet with all the declared supertypes for the indicated ObjectTypeCollection<org.mule.metadata.api.model.ObjectType> getAllBaseTypes()
Collection with all the types that are extended by another typeCollection<org.mule.metadata.api.model.ObjectType> getAllSubTypes()
Collection with all the types which extend another type, in no particular orderboolean containsBaseType(org.mule.metadata.api.model.ObjectType type)
typeId in the context of subTypes mapping.
If a typeId is available for the given type,
the lookup will be performed by TypeIdAnnotation.getValue() disregarding MetadataType equality in its
full extent, which includes type generics and interfaces implementations, and
defaulting to MetadataType#equals comparison if no typeId was foundtype - the MetadataType for which to retrieve its declared subTypestypeCollection<org.mule.metadata.api.model.ObjectType> getExtensionTypes(String extensionName)
Collection with all the types declared by the extension with name extensionNameCopyright © 2017 MuleSoft, Inc.. All rights reserved.