public class DefaultModelTypeFactory extends ModelTypeFactory
ModelType
s.Constructor and Description |
---|
DefaultModelTypeFactory(java.util.List<ModelType> modelTypes,
java.util.Collection<ModelDefinition> unloadedModelTypes,
java.util.Collection<TypeDefinition<ContentRootFactory>> contentRootFactories)
Creates a factory for specified model types.
|
Modifier and Type | Method and Description |
---|---|
ModelFactory |
createModelFactory(java.util.Map attributes)
Creates a
ModelFactory based on this model type factory. |
java.util.Collection<ContentRootFactory> |
getContentRootFactories()
Gets the
ContentRootFactory s known to this factory. |
<T extends ModelType> |
getModelType(java.lang.Class<T> type)
Gets the model type instance for a
ModelType class. |
ModelType |
getModelTypeForAdapterType(java.lang.Class<? extends ModelAdapter> type)
Gets the model type instance for a
ModelAdapter class. |
java.util.List<ModelType> |
getModelTypes()
Gets the model types known to this factory, ordered by time of discovery.
|
java.util.Collection<ModelType> |
getModelTypes(Element element)
Gets the model types for an element.
|
boolean |
isModelType(java.lang.Class<?> type)
Gets whether a type is a model type known to this factory.
|
public DefaultModelTypeFactory(java.util.List<ModelType> modelTypes, java.util.Collection<ModelDefinition> unloadedModelTypes, java.util.Collection<TypeDefinition<ContentRootFactory>> contentRootFactories)
public boolean isModelType(java.lang.Class<?> type)
ModelTypeFactory
isModelType
in class ModelTypeFactory
public java.util.List<ModelType> getModelTypes()
ModelTypeFactory
getModelTypes
in class ModelTypeFactory
public java.util.Collection<ContentRootFactory> getContentRootFactories()
ModelTypeFactory
ContentRootFactory
s known to this factory.getContentRootFactories
in class ModelTypeFactory
public <T extends ModelType> T getModelType(java.lang.Class<T> type)
ModelTypeFactory
ModelType
class.getModelType
in class ModelTypeFactory
public ModelType getModelTypeForAdapterType(java.lang.Class<? extends ModelAdapter> type)
ModelTypeFactory
ModelAdapter
class.getModelTypeForAdapterType
in class ModelTypeFactory
public java.util.Collection<ModelType> getModelTypes(Element element)
ModelTypeFactory
getModelTypes
in class ModelTypeFactory
public ModelFactory createModelFactory(java.util.Map attributes)
ModelTypeFactory
ModelFactory
based on this model type factory.createModelFactory
in class ModelTypeFactory