class ReflectToIntFunction
            implements ToIntFunction {
        final Method method;

        public ReflectToIntFunction(Method method) {
            this.method = method;
        }

        public int applyAsInt(Object object) {<FILL_FUNCTION_BODY>}
    }

            try {
                return (Integer) method.invoke(object);
            } catch (Exception e) {
                throw new JSONException("applyAsInt error", e);
            }
        
<no_super_class>