public void instantiateField ( String targetField , String targetType , String targetTypeInit , String ... sourceFields ) { TransformationStep step = new TransformationStep ( ) ; step . setSourceFields ( sourceFields ) ; step . setTargetField ( targetField ) ; step . setOperationParameter ( TransformationConstants . INSTANTIATE_TARGETTYPE_PARAM , targetType ) ; if ( targetTypeInit != null ) { step . setOperationParameter ( TransformationConstants . INSTANTIATE_INITMETHOD_PARAM , targetTypeInit ) ; } step . setOperationName ( "instantiate" ) ; steps . add ( step ) ; }
Adds an instantiate step to the transformation description . An object defined through the given target type will be created . For the instantiation the targetTypeInit method will be used . If this parameter is null the constructor of the targetType will be used with the object type of the source object as parameter .