@SuppressWarnings("deprecation")
    public ResourceHandle withInheritanceType(InheritedValues.Type type) {
        Validate.notNull(type, "The inheritance type must not be null");
        if (inheritanceType == type) return this;
        ResourceHandle clone = clone();
        clone.setInheritanceType(type);
        return clone;
    }
@ SuppressWarnings ( "deprecation" ) public ResourceHandle withInheritanceType ( InheritedValues . Type type ) { Validate . notNull ( type , "The inheritance type must not be null" ) ; if ( inheritanceType == type ) return this ; ResourceHandle clone = clone ( ) ; clone . setInheritanceType ( type ) ; return clone ; }
Returns a {@link ResourceHandle} with the given inheritance type for {@link #getInherited(String, Class)} and
{@link #getInherited(String, Object)}.

@param type the type
@return the resource handle; might be <code>this</code> if the type is unchanged.