final XFunctionTypeRef cloneReference = XtypeFactory.eINSTANCE.createXFunctionTypeRef(); for (final JvmTypeReference paramType : functionRef.getParamTypes()) { cloneReference.getParamTypes().add(cloneAndAssociate(
@Override public JvmTypeReference toTypeReference() { XFunctionTypeRef result = getOwner().getServices().getXtypeFactory().createXFunctionTypeRef(); result.setType(getType()); result.setEquivalent(getEquivalentTypeReference()); if (parameterTypes != null) { for(LightweightTypeReference parameterType: parameterTypes) { result.getParamTypes().add(parameterType.toTypeReference()); } } if (returnType != null) { result.setReturnType(returnType.toTypeReference()); } return result; }