asString static method
Converts a TypeCode into its string name.
type
the TypeCode to convert into a string. Returns the name of the TypeCode passed as a string value.
Implementation
static String asString(TypeCode type) {
switch (type) {
case TypeCode.Unknown:
return 'unknown';
case TypeCode.String:
return 'String';
case TypeCode.Boolean:
return 'bool';
case TypeCode.Integer:
return 'int';
case TypeCode.Long:
return 'int';
case TypeCode.Float:
return 'double';
case TypeCode.Double:
return 'double';
case TypeCode.DateTime:
return 'DateTime';
case TypeCode.Duration:
return 'Duration';
case TypeCode.Object:
return 'object';
case TypeCode.Enum:
return 'enum';
case TypeCode.Array:
return 'List';
case TypeCode.Map:
return 'Map';
default:
return 'unknown';
}
}