}
public static ComputationTarget resolve(final ComputationTargetResolver underlying, final ComputationTargetSpecification specification, final VersionCorrection versionCorrection) {
final Function2<ComputationTargetResolver.AtVersionCorrection, ComputationTargetSpecification, UniqueIdentifiable> resolver = s_resolvers.get(specification.getType());
if (resolver != null) {
final UniqueIdentifiable lazy = resolver.execute(underlying.atVersionCorrection(versionCorrection), specification);
if (specification.getUniqueId().isVersioned()) {
return new ComputationTarget(specification, lazy);
} else {
return new ComputationTarget(specification.replaceIdentifier(lazy.getUniqueId()), lazy);
}
} else {
return underlying.resolve(specification, versionCorrection);
}
}