public class JavaTypeConverter extends Object
Constructor and Description |
---|
JavaTypeConverter() |
Modifier and Type | Method and Description |
---|---|
static String |
getJavaLangTypeName(String name)
Creates a java.lang.
|
void |
setJavaTypeConversionIgnoreList(String commaSeparatedIgnoreList)
Specifies a list of one or more fully qualified java types that should be ignored
whenever a type conversion is done.
|
String |
typeConvert(String sourceType,
String sourceValue,
String targetType)
Attempts to code a type conversion from the specified source value to the target
type that can be used on the right hand side of an assignment.
|
public JavaTypeConverter()
public void setJavaTypeConversionIgnoreList(String commaSeparatedIgnoreList)
commaSeparatedIgnoreList
- comma separated list of types to be ignoredpublic String typeConvert(String sourceType, String sourceValue, String targetType)
sourceType
- The fully qualified data type of the source valuesourceValue
- The actual source value (usually a variable name)targetType
- The fully qualified data type of the target valuepublic static String getJavaLangTypeName(String name)
name
,
inserting 'java.lang.' in front if needed. Many EJB3 and Hibernate configuration files
require java.lang. in the type name, where Java code does not (gives compiler warning).
This allows UML Primitive types to be modeled and mapped without java.lang. implementation.name
- the name of the model element.Copyright © 2003–2014 AndroMDA.org. All rights reserved.