class XMapSpringUtil {

    /**
     * Get spring object
     * @param type type
     * @param beanName bean name
     * @param applicationContext application context
     * @return spring object
     */
    public static Object getSpringObject(Class type, String beanName,
                                         ApplicationContext applicationContext) {
        if (type == Resource.class) {
            return applicationContext.getResource(beanName);
        } else {
            return applicationContext.getBean(beanName, type);
        }
    }

    /**
     * Get spring object
     * @param xam XAnnotated member
     * @param applicationContext application context
     * @param base element base
     * @return
     */
    public static Object getSpringObject(XAnnotatedMember xam,
                                         ApplicationContext applicationContext, Element base) {<FILL_FUNCTION_BODY>}
}

        String val = DOMHelper.getNodeValue(base, xam.path);
        if (val != null && val.length() > 0) {
            if (xam.trim) {
                val = val.trim();
            }
            return getSpringObject(xam.type, val, applicationContext);
        }
        return null;
    
<no_super_class>