public static Object setAdditionalInstanceField(Object obj, String key, Object value) {
        if (obj == null)
            throw new NullPointerException("object must not be null");
        if (key == null)
            throw new NullPointerException("key must not be null");

        HashMap<String, Object> objectFields;
        synchronized (additionalFields) {
            objectFields = additionalFields.get(obj);
            if (objectFields == null) {
                objectFields = new HashMap<String, Object>();
                additionalFields.put(obj, objectFields);
            }
        }

        synchronized (objectFields) {
            return objectFields.put(key, value);
        }
    }
Attaches any value to an object instance. This simulates adding an instance field.
The value can be retrieved again with {@link #getAdditionalInstanceField}.

@param obj   The object instance for which the value should be stored.
@param key   The key in the value map for this object instance.
@param value The value to store.
@return The previously stored value for this instance/key combination, or {@code null} if there was none.
android/android_framework/base/src/main/java/util/XposedHelpers.java