public Reflect set(String name, Object value) throws ReflectException {
        try {

            // Try setting a public field
            Field field = type().getField(name);
            field.set(object, unwrap(value));
            return this;
        } catch (Exception e1) {

            // Try again, setting a non-public field
            try {
                accessible(type().getDeclaredField(name)).set(object, unwrap(value));
                return this;
            } catch (Exception e2) {
                throw new ReflectException(e2);
            }
        }
    }
public Reflect set ( String name , Object value ) throws ReflectException { try { Field field = type ( ) . getField ( name ) ; field . set ( object , unwrap ( value ) ) ; return this ; } catch ( Exception e1 ) { try { accessible ( type ( ) . getDeclaredField ( name ) ) . set ( object , unwrap ( value ) ) ; return this ; } catch ( Exception e2 ) { throw new ReflectException ( e2 ) ; } } }
Set a field value.
<p>
This is roughly equivalent to {@link Field#set(Object, Object)}. If the wrapped object is a {@link Class}, then
this will set a value to a static member field. If the wrapped object is any other {@link Object}, then this will
set a value to an instance member field.

@param name
The field name
@param value
The new field value
@return The same wrapped object, to be used for further reflection.
@throws ReflectException
If any reflection exception occurred.