public class ModelElementTypeImpl extends Object implements ModelElementType
Constructor and Description |
---|
ModelElementTypeImpl(ModelImpl model,
String name,
Class<? extends ModelElementInstance> instanceType) |
public ModelElementTypeImpl(ModelImpl model, String name, Class<? extends ModelElementInstance> instanceType)
public ModelElementInstance newInstance(ModelInstance modelInstance)
newInstance
in interface ModelElementType
public ModelElementInstance newInstance(ModelInstanceImpl modelInstance, DomElement domElement)
public void registerAttribute(Attribute<?> attribute)
public void registerChildElementType(ModelElementType childElementType)
public void registerChildElementCollection(ChildElementCollection<?> childElementCollection)
public void registerExtendingType(ModelElementType modelType)
protected ModelElementInstance createModelElementInstance(ModelTypeInstanceContext instanceContext)
public final List<Attribute<?>> getAttributes()
getAttributes
in interface ModelElementType
public String getTypeName()
getTypeName
in interface ModelElementType
public Class<? extends ModelElementInstance> getInstanceType()
getInstanceType
in interface ModelElementType
public void setTypeNamespace(String typeNamespace)
public String getTypeNamespace()
getTypeNamespace
in interface ModelElementType
public void setBaseType(ModelElementTypeImpl baseType)
public void setInstanceProvider(ModelElementTypeBuilder.ModelTypeInstanceProvider<?> instanceProvider)
public boolean isAbstract()
isAbstract
in interface ModelElementType
public void setAbstract(boolean isAbstract)
public Collection<ModelElementType> getExtendingTypes()
getExtendingTypes
in interface ModelElementType
public Collection<ModelElementType> getAllExtendingTypes()
getAllExtendingTypes
in interface ModelElementType
public void resolveExtendingTypes(Set<ModelElementType> allExtendingTypes)
allExtendingTypes
- set of calculated extending typespublic void resolveBaseTypes(List<ModelElementType> baseTypes)
baseTypes
- list of calculated base typespublic ModelElementType getBaseType()
getBaseType
in interface ModelElementType
public Model getModel()
getModel
in interface ModelElementType
public List<ModelElementType> getChildElementTypes()
getChildElementTypes
in interface ModelElementType
public List<ModelElementType> getAllChildElementTypes()
getAllChildElementTypes
in interface ModelElementType
public List<ChildElementCollection<?>> getChildElementCollections()
public List<ChildElementCollection<?>> getAllChildElementCollections()
public Collection<ModelElementInstance> getInstances(ModelInstance modelInstance)
getInstances
in interface ModelElementType
protected List<DomElement> getElementsByNameNs(DomDocument document, String namespaceURI)
public boolean isBaseTypeOf(ModelElementType elementType)
elementType
- the element type to testchildElementTypeClass
is a base type of this type, else otherwisepublic Collection<Attribute<?>> getAllAttributes()
public Attribute<?> getAttribute(String attributeName)
getAttribute
in interface ModelElementType
attributeName
- the name of the attributepublic ChildElementCollection<?> getChildElementCollection(ModelElementType childElementType)
Copyright © 2017. All rights reserved.