Class ModelImporter
java.lang.Object
org.cqframework.cql.cql2elm.model.ModelImporter
-
Constructor Summary
ConstructorsConstructorDescriptionModelImporter(org.hl7.elm_modelinfo.r1.ModelInfo modelInfo, ModelManager modelManager) -
Method Summary
Modifier and TypeMethodDescriptionIterable<org.hl7.cql.model.ModelContext> getTypes()booleanisParentGeneric(org.hl7.cql.model.ClassType type) Method returns true if the class' base type is a generic type.voidvalidateFreeAndBoundParameters(org.hl7.cql.model.ClassType type, org.hl7.elm_modelinfo.r1.ClassInfo definition) Method checks to see if a class' parameters covers its parent parameters.
-
Constructor Details
-
ModelImporter
-
-
Method Details
-
getTypes
-
getConversions
-
getContexts
-
getDefaultContextName
-
validateFreeAndBoundParameters
public void validateFreeAndBoundParameters(org.hl7.cql.model.ClassType type, org.hl7.elm_modelinfo.r1.ClassInfo definition) Method checks to see if a class' parameters covers its parent parameters. These represent remaining degrees of freedom in the child class. For instance,
All parameters in the parent class, not covered by the child class must be bound to a concrete type. In the above example, the parameter S is bound to the type String.MyGeneric<T> extends SomeOtherGeneric<String,T>If a parameter in the parent type is not covered by a child parameter nor bound to a concrete type, an exception is thrown indicating that the symbol is not known. In the example below, T is neither covered nor bound and thus is an unknown symbol.
MyGeneric extends SomeOtherGeneric<String,T>
- Parameters:
type-definition-
-
isParentGeneric
public boolean isParentGeneric(org.hl7.cql.model.ClassType type) Method returns true if the class' base type is a generic type.- Parameters:
type-- Returns:
- True if the parent of class 'type' is a generic class.
-