Package org.hl7.cql.model
Class ClassType
java.lang.Object
org.hl7.cql.model.DataType
org.hl7.cql.model.ClassType
- All Implemented Interfaces:
NamedType
- Direct Known Subclasses:
ProfileType
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionClassType(String name, DataType baseType, Collection<ClassTypeElement> elements) ClassType(String name, DataType baseType, Collection<ClassTypeElement> elements, Collection<TypeParameter> parameters) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(ClassTypeElement element) voidaddElements(Collection<ClassTypeElement> elements) voidaddGenericParameter(Collection<TypeParameter> parameters) Adds collection of type parameters to existing set.voidaddGenericParameter(TypeParameter genericParameter) Adds a parameter declaration to the generic type.voidaddRelationship(Relationship relationship) voidaddSearch(SearchType search) voidaddTargetRelationship(Relationship relationship) booleanfindSearch(String searchPath) getGenericParameterByIdentifier(String identifier) Returns the parameter with the given parameter identifier.getGenericParameterByIdentifier(String identifier, boolean inCurrentClassOnly) Returns the parameter with the given parameter identifier.Returns the generic parameters for the generic type.getLabel()getName()inthashCode()instantiate(InstantiationContext context) booleanisCompatibleWith(DataType other) booleanbooleanisInstantiable(DataType callType, InstantiationContext context) booleanvoidsetGenericParameters(List<TypeParameter> genericParameters) Sets the generic parameters for the generic type.voidsetIdentifier(String identifier) voidvoidsetPrimaryCodePath(String primaryCodePath) voidsetPrimaryValueSetPath(String primaryValueSetPath) voidsetRetrievable(boolean retrievable) voidtoLabel()toString()Methods inherited from class org.hl7.cql.model.DataType
getBaseType, getCommonSuperTypeOf, isSubTypeOf, isSuperTypeOf
-
Constructor Details
-
ClassType
public ClassType(String name, DataType baseType, Collection<ClassTypeElement> elements, Collection<TypeParameter> parameters) -
ClassType
public ClassType() -
ClassType
-
ClassType
-
ClassType
-
-
Method Details
-
getName
-
getNamespace
- Specified by:
getNamespacein interfaceNamedType
-
getSimpleName
- Specified by:
getSimpleNamein interfaceNamedType
-
getIdentifier
-
setIdentifier
-
getLabel
-
setLabel
-
getTarget
-
setTarget
-
isRetrievable
public boolean isRetrievable() -
setRetrievable
public void setRetrievable(boolean retrievable) -
getPrimaryCodePath
-
setPrimaryCodePath
-
getPrimaryValueSetPath
-
setPrimaryValueSetPath
-
getRelationships
-
addRelationship
-
getTargetRelationships
-
addTargetRelationship
-
getSearches
-
addSearch
-
findSearch
-
getGenericParameters
Returns the generic parameters for the generic type. For instance, for the generic type Map<K,V extends Person>, two generic parameters will be returned: K and V extends Person. The latter parameter has a constraint restricting the type of the bound type to be a valid subtype of Person.- Returns:
- Class' generic parameters
-
setGenericParameters
Sets the generic parameters for the generic type. For instance, for the generic type Map<K,V extends Person>, two generic parameters should be set: K and V extends Person. The latter parameter has a constraint restricting the type of the bound type to be a valid subtype of Person.- Parameters:
genericParameters-
-
addGenericParameter
Adds a parameter declaration to the generic type.- Parameters:
genericParameter-
-
addGenericParameter
Adds collection of type parameters to existing set.- Parameters:
parameters-
-
getGenericParameterByIdentifier
Returns the parameter with the given parameter identifier. If not found in the given class, it looks in the parent class.- Parameters:
identifier-- Returns:
- Generic parameter with the given name in the current class or in the base class. Null if none found.
-
getGenericParameterByIdentifier
Returns the parameter with the given parameter identifier. If inCurrentClassOnly is false, if not found in the given class, then it looks in the parent class. If inCurrentClassOnly is true, only looks for parameter in the given class.- Parameters:
identifier-inCurrentClassOnly-- Returns:
- Class' generic parameter
-
getElements
-
getAllElements
-
addElement
-
addElements
-
hashCode
public int hashCode() -
equals
-
toString
-
toLabel
-
getTupleType
-
isCompatibleWith
- Overrides:
isCompatibleWithin classDataType
-
isGeneric
public boolean isGeneric() -
isInstantiable
- Specified by:
isInstantiablein classDataType
-
instantiate
- Specified by:
instantiatein classDataType
-