Package org.faktorips.codegen.dthelpers
Class ArrayOfValueDatatypeHelper
java.lang.Object
org.faktorips.codegen.dthelpers.AbstractDatatypeHelper
org.faktorips.codegen.dthelpers.ArrayOfValueDatatypeHelper
- All Implemented Interfaces:
BaseDatatypeHelper<JavaCodeFragment>,DatatypeHelper
A helper class for
ArrayOfValueDatatype. ValueOf and newInstance expressions are not
supported by this helper. A call to these method returns a "null" fragment.- Author:
- Peter Erzberger
-
Field Summary
Fields inherited from interface org.faktorips.codegen.DatatypeHelper
BIG_DECIMAL, BOOLEAN, DECIMAL, INTEGER, LONG, MONEY, PRIMITIVE_BOOLEAN, PRIMITIVE_INTEGER, STRING -
Constructor Summary
ConstructorsConstructorDescriptionArrayOfValueDatatypeHelper(ArrayOfValueDatatype datatype, DatatypeHelper elementDatatypeHelper) -
Method Summary
Modifier and TypeMethodDescriptionReturns the datatype this is a helper for.Returns the qualified Java class name the datatype represents.newInstance(String value) Returns a "null" fragment.voidsetDatatype(Datatype datatype) Sets the datatype this is a helper for.protected JavaCodeFragmentvalueOfExpression(String expression) Returns a "null" fragment.Methods inherited from class org.faktorips.codegen.dthelpers.AbstractDatatypeHelper
createCastExpression, getRangeJavaClassName, getToStringExpression, newEnumValueSetInstance, newEnumValueSetInstance, newInstanceFromExpression, newInstanceFromExpression, newRangeInstance, newSafeCopy, nullExpression, referenceOrSafeCopyIfNeccessaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.faktorips.codegen.DatatypeHelper
getValueSetJavaClassName, newValueInstance
-
Constructor Details
-
ArrayOfValueDatatypeHelper
public ArrayOfValueDatatypeHelper(ArrayOfValueDatatype datatype, DatatypeHelper elementDatatypeHelper)
-
-
Method Details
-
setDatatype
Description copied from interface:DatatypeHelperSets the datatype this is a helper for. Introduced to enable setter based dependency injection, needed for example for Eclipse's extension point mechanism.- Specified by:
setDatatypein interfaceBaseDatatypeHelper<JavaCodeFragment>- Specified by:
setDatatypein interfaceDatatypeHelper- Overrides:
setDatatypein classAbstractDatatypeHelper
-
getDatatype
Description copied from interface:DatatypeHelperReturns the datatype this is a helper for.- Specified by:
getDatatypein interfaceBaseDatatypeHelper<JavaCodeFragment>- Specified by:
getDatatypein interfaceDatatypeHelper- Overrides:
getDatatypein classAbstractDatatypeHelper
-
getJavaClassName
Description copied from interface:DatatypeHelperReturns the qualified Java class name the datatype represents. -
valueOfExpression
Returns a "null" fragment. This method is supposed to be overridden by subclasses.It is used within the
newInstanceFromExpression(String)method. It returns aJavaCodeFragmentwith sourcecode that creates an instance of the datatype's Java class with the given expression.If the expression is
nullthe fragment's sourcecode is either the String "null" or the sourcecode to get an instance of the appropriate null object. Preconditions: Expression may not be null or empty. When evaluated the expression must return a String.- Specified by:
valueOfExpressionin classAbstractDatatypeHelper
-
newInstance
Returns a "null" fragment. Returns aJavaCodeFragmentwith sourcecode that creates an instance of the datatype's Java class with the given value. If the value is null the fragment's sourcecode is either the String "null" or the sourcecode to get an instance of the appropriate null object.
-