class DefaultComputationTargetResolver implements ComputationTargetResolver, LazyResolver, ComputationTargetTypeProvider {

  @Override
  public ComputationTarget resolve(final ComputationTargetSpecification specification, final VersionCorrection versionCorrection) {
    final ComputationTargetType type = specification.getType();
    if (ComputationTargetType.NULL == type) {
      return ComputationTarget.NULL;
    } else {
      final ObjectResolver<?> resolver = _resolvers.get(type);
      if (resolver != null) {
        final UniqueIdentifiable resolved = resolver.resolveObject(specification.getUniqueId(), versionCorrection);
        if (resolved != null) {
          return ComputationTargetResolverUtils.createResolvedTarget(specification, resolved);
        } else {
          s_logger.info("Unable to resolve {}", specification);
          return null;
        }
      } else {
        throw new OpenGammaRuntimeException("Unhandled computation target type " + specification.getType());
      }
    }
  }

  public  DefaultComputationTargetResolver();
  public  DefaultComputationTargetResolver(final SecuritySource securitySource);
  public  DefaultComputationTargetResolver(final SecuritySource securitySource, final PositionSource positionSource);

}