class XMethodGetter implements XGetter {

    /**
     * method
     */
    private Method   method;

    /**
     * class
     */
    private Class<?> clazz;

    /**
     * bean name
     */
    private String   name;

    public XMethodGetter(Method method, Class<?> clazz, String name) {
        this.method = method;
        this.clazz = clazz;
        this.name = name;
    }

    /**
     * @see XGetter#getType()
     */
    public Class<?> getType() {<FILL_FUNCTION_BODY>}

    /**
     * @see XGetter#getValue(Object)
     */
    public Object getValue(Object instance) throws Exception {
        if (method == null) {
            throw new IllegalArgumentException("no such getter method: " + clazz.getName() + '.'
                                               + name);
        }

        if (instance == null) {
            return null;
        }
        return method.invoke(instance, new Object[0]);
    }

}

        if (method == null) {
            throw new IllegalArgumentException("no such getter method: " + clazz.getName() + '.'
                                               + name);
        }

        return method.getReturnType();
    
<no_super_class>