DefaultTypeNameProvider class

Default implementation of the TypeNameProvider interface. This implementation returns type names as-is, but allows inheritors to provide their own implementation by overriding getTypeNameForType and/or getTypeNameForTypedElement.

Interface Realizations

Operations

NameReturnsDescription
getComplexTypeName(typedElement)

DefaultTypeNameProvider.getComplexTypeName

X

DEPRECATED: Returns the name of the provided element's complex type (any type that is not a DataType). Override this function to provide a custom name for the complex type. The default implementation calls the getComplexTypeNameForType function using the type of the typedElement.

Parameters
NameTypeDescription
typedElementTypedElement Any TypedElement instance.
Return value
Type: string 
string DEPRECATED: Returns the name of the provided element's complex type (any type that is not a DataType). Override this function to provide a custom name for the complex type. The default implementation calls the getComplexTypeNameForType function using the type of the typedElement. 
getComplexTypeNameForType(type)

DefaultTypeNameProvider.getComplexTypeNameForType

X

DEPRECATED: Returns the name of the provided complex type (any type that is not a DataType). Override this function to provide a custom name for the complex type.

Parameters
NameTypeDescription
typeType The type information.
Return value
Type: string 
string DEPRECATED: Returns the name of the provided complex type (any type that is not a DataType). Override this function to provide a custom name for the complex type. 
getDataTypeName(typedElement)

DefaultTypeNameProvider.getDataTypeName

X

DEPRECATED: Returns the name of the provided element's data type. Override this function to map primitives and other data types (both built-in or types exported from a profile) to the target language. The default implementation calls the getDataTypeNameForType function using the type of the typedElement.

Parameters
NameTypeDescription
typedElementTypedElement Any TypedElement instance.
Return value
Type: string 
string DEPRECATED: Returns the name of the provided element's data type. Override this function to map primitives and other data types (both built-in or types exported from a profile) to the target language. The default implementation calls the getDataTypeNameForType function using the type of the typedElement. 
getDataTypeNameForType(type)

DefaultTypeNameProvider.getDataTypeNameForType

X

DEPRECATED: Returns the name of the provided data type. Override this function to map primitives and other data types (both built-in or types exported from a profile) to the target language.

Parameters
NameTypeDescription
typeType The type information.
Return value
Type: string 
string DEPRECATED: Returns the name of the provided data type. Override this function to map primitives and other data types (both built-in or types exported from a profile) to the target language. 
getTypeName(type)

DefaultTypeNameProvider.getTypeName

X

Returns the name of the provided type. Returns the name of the provided element's type.

Parameters
NameTypeDescription
typeType Any model type.
Return value
Type: string 
string Returns the name of the provided type. Returns the name of the provided element's type. 
getTypeName(typedElement)

DefaultTypeNameProvider.getTypeName

X

Returns the name of the provided type. Returns the name of the provided element's type.

Parameters
NameTypeDescription
typedElementTypedElement Any model element that has a type.
Return value
Type: string 
string Returns the name of the provided type. Returns the name of the provided element's type. 
getTypeNameForType(type, isDataType)

DefaultTypeNameProvider.getTypeNameForType

X

Returns the name of the provided type. This function is also called by getTypeNameOfTypedElement() if that function is not overridden.

Parameters
NameTypeDescription
typeType The type information.
isDataTypeboolean Indicates if the type is a data type (that is, an Enumeration, PrimitiveType or DataType).
Return value
Type: string 
string Returns the name of the provided type. This function is also called by getTypeNameOfTypedElement() if that function is not overridden. 
getTypeNameForTypedElement(typedElement, isDataType, isMultiValued)

DefaultTypeNameProvider.getTypeNameForTypedElement

X

Returns the name of the provided element's type. Internally, this function calls getTypeNameForType for the type, but you should override this function if you need to provide different type names for a type depending on the context. For example, you may return a different type name for a property or parameter that is multi-valued.

Parameters
NameTypeDescription
typedElementTypedElement Any element that has a type.
isDataTypeboolean Indicates if the element's type is a data type (that is, an Enumeration, PrimitiveType or DataType).
isMultiValuedboolean Indicates if the TypedElement is multi-valued (that is, has an upper bound greater than 1).
Return value
Type: string 
string Returns the name of the provided element's type. Internally, this function calls getTypeNameForType for the type, but you should override this function if you need to provide different type names for a type depending on the context. For example, you may return a different type name for a property or parameter that is multi-valued.