/** * Returns a descriptor of the response entity returned by a negotiated {@link Method#GET} call. * * @param variant * The selected variant descriptor. * @return The response entity descriptor. * @throws ResourceException */ private RepresentationInfo doGetInfo(Variant variant) throws ResourceException { RepresentationInfo result = null; if (variant != null) { if (variant instanceof VariantInfo) { result = doHandle(((VariantInfo) variant).getAnnotationInfo(), variant); } else if (variant instanceof RepresentationInfo) { result = (RepresentationInfo) variant; } else { result = getInfo(variant); } } else { result = doGetInfo(); } return result; }