TypeNameProvider interface

Defines the interface for classes that determine type names for types in a model. This interface is typically implemented by language-specific code generators, which may need to convert the name of a model type to the name used by the programming lanugage. For example: a decimal, float or integer in a model should result in a type named 'number' when generating TypeScript code. This interface is implemented by the DefaultTypeNameProvider, which can be extended to provide language-specific type names.

Operations

NameReturnsDescription
getTypeName(type)

TypeNameProvider.getTypeName

X

Gets the name of the typed type. If the name could not be determined, this function returns null. Gets the name of the typed element's type. If the name could not be determined, this function returns null.

Parameters
NameTypeDescription
typeType 
Return value
Type: string 
string Gets the name of the typed type. If the name could not be determined, this function returns null. Gets the name of the typed element's type. If the name could not be determined, this function returns null. 
getTypeName(typedElement)

TypeNameProvider.getTypeName

X

Gets the name of the typed type. If the name could not be determined, this function returns null. Gets the name of the typed element's type. If the name could not be determined, this function returns null.

Parameters
NameTypeDescription
typedElementTypedElement 
Return value
Type: string 
string Gets the name of the typed type. If the name could not be determined, this function returns null. Gets the name of the typed element's type. If the name could not be determined, this function returns null.