return Collections.singleton(new ValueSpecification(input.getValueName(), input.getTargetSpecification(), properties));
}
@Override
public Set<ComputedValue> execute(final FunctionExecutionContext executionContext, final FunctionInputs inputs, final ComputationTarget target, final Set<ValueRequirement> desiredValues) {
final ComputedValue input = inputs.getAllValues().iterator().next();
final ValueSpecification inputSpec = input.getSpecification();
final YieldAndDiscountCurve curve = (YieldAndDiscountCurve) input.getValue();
final ValueRequirement desiredValue = desiredValues.iterator().next();
final String shift = desiredValue.getConstraint(SHIFT);
final ValueProperties.Builder properties = createValueProperties(inputSpec).with(SHIFT, shift);
final OverrideOperationCompiler compiler = OpenGammaExecutionContext.getOverrideOperationCompiler(executionContext);
if (compiler == null) {
throw new IllegalStateException("No override operation compiler for " + shift + " in execution context");
}
s_logger.debug("Applying {} to yield curve {}", shift, curve);
final Object result = compiler.compile(shift, executionContext.getComputationTargetResolver()).apply(desiredValue, curve);
s_logger.debug("Got result {}", result);
return Collections.singleton(new ComputedValue(new ValueSpecification(inputSpec.getValueName(), inputSpec.getTargetSpecification(), properties.get()), result));
}