Package org.faktorips.codegen
Interface PrimitiveDatatypeHelper
- All Superinterfaces:
BaseDatatypeHelper<JavaCodeFragment>,DatatypeHelper
- All Known Implementing Classes:
AbstractPrimitiveDatatypeHelper,PrimitiveBooleanHelper,PrimitiveIntegerHelper,PrimitiveLongHelper
Extended DatatypeHelper variant for data types representing Java's primitives.
-
Field Summary
Fields inherited from interface org.faktorips.codegen.DatatypeHelper
BIG_DECIMAL, BOOLEAN, DECIMAL, INTEGER, LONG, MONEY, PRIMITIVE_BOOLEAN, PRIMITIVE_INTEGER, STRING -
Method Summary
Modifier and TypeMethodDescriptionRetrieves theDatatypeHelperfor the wrapper type of the primitive type for which this helper is responsible.toWrapper(JavaCodeFragment expression) Given a JavaCodeFragment containing an expression of the primitive type this is a helper for, returns a JavaCodeFragment that converts the given expression to the appropriate wrapper class.Methods inherited from interface org.faktorips.codegen.DatatypeHelper
createCastExpression, getDatatype, getJavaClassName, getRangeJavaClassName, getToStringExpression, getValueSetJavaClassName, newEnumValueSetInstance, newEnumValueSetInstance, newInstance, newInstanceFromExpression, newInstanceFromExpression, newRangeInstance, newValueInstance, nullExpression, referenceOrSafeCopyIfNeccessary, setDatatype
-
Method Details
-
toWrapper
Given a JavaCodeFragment containing an expression of the primitive type this is a helper for, returns a JavaCodeFragment that converts the given expression to the appropriate wrapper class.- Throws:
IllegalArgumentException- if expression is null.
-
getWrapperTypeHelper
DatatypeHelper getWrapperTypeHelper()Retrieves theDatatypeHelperfor the wrapper type of the primitive type for which this helper is responsible.- Returns:
- The
DatatypeHelperof the not primitive wrapper type
-