/** * Returns a "pretty" XML representation of the root element of this XMap (may be null). * * @return a "pretty" XML representation of the root element of this XMap (may be null). */ @Override public String toString() { return getXMLUtil().toNodeString(root); }
public PropertyDescriptor(String propertyName, Class<?> beanClass) { this.name = propertyName; try { setReadMethod(beanClass, createDefaultMethodName(propertyName, "is")); } catch (Exception e) { setReadMethod(beanClass, createDefaultMethodName(propertyName, "get")); } setWriteMethod(beanClass, createDefaultMethodName(propertyName, "set")); }
public PropertyDescriptor(String propertyName, Method getter, Method setter) { this.name = propertyName; setReadMethod(getter); setWriteMethod(setter); }
private void loadCustomClassGetter(XMap element, boolean custom) { XMap classGetter = element.getOne("class-getter"); if (classGetter != null) { String type = classGetter.get("@type"); try { this.classGetter = (ClassGetter)TypeUtil.newInstance(type); classGetterSet = true; } catch (Exception e) { throw new GraniteConfigException("Could not instantiate ClassGetter: " + type, e); } } }
private static Class<?> initClass(String type) { try { return TypeUtil.forName(type); } catch (Throwable t) { // No Java 8 } return null; }
public static XMLUtil getXMLUtil() { if (xmlUtil == null) xmlUtil = buildXMLUtil(); return xmlUtil; }
public BeanInfo(Class<?> beanClass) { this.beanClass = beanClass; if (properties == null) properties = introspectProperties(); }
/** * If there is only one TypeVariable in method's argument list, it will be replaced * by the type of the superclass of the service. */ protected void findAndChange(Type[] paramTypes, Class<?> declaringClass, ParameterizedType[] declaringTypes) { for (int j = 0; j < paramTypes.length; j++) paramTypes[j] = TypeUtil.resolveTypeVariable(paramTypes[j], declaringClass, declaringTypes); }
@Override protected Object internalConvert(Object value, Type targetType) { return (value == null ? null : xmlUtil.buildDocument((String)value)); } }
private XMLUtil getXMLUtil() { if (xmlUtil == null) xmlUtil = XMLUtilFactory.getXMLUtil(); return xmlUtil; }
public PropertyDescriptor(String propertyName, Class<?> beanClass) { this.name = propertyName; try { setReadMethod(beanClass, createDefaultMethodName(propertyName, "is")); } catch (Exception e) { setReadMethod(beanClass, createDefaultMethodName(propertyName, "get")); } setWriteMethod(beanClass, createDefaultMethodName(propertyName, "set")); }
/** * Returns a "pretty" XML representation of the root element of this XMap (may be null). * * @return a "pretty" XML representation of the root element of this XMap (may be null). */ @Override public String toString() { return getXMLUtil().toNodeString(root); }
public PropertyDescriptor(String propertyName, Method getter, Method setter) { this.name = propertyName; setReadMethod(getter); setWriteMethod(setter); }
public static XMLUtil getXMLUtil() { if (xmlUtil == null) xmlUtil = buildXMLUtil(); return xmlUtil; }
public BeanInfo(Class<?> beanClass) { this.beanClass = beanClass; if (properties == null) properties = introspectProperties(); }
/** * If there is only one TypeVariable in method's argument list, it will be replaced * by the type of the superclass of the service. */ protected void findAndChange(Type[] paramTypes, Class<?> declaringClass, ParameterizedType[] declaringTypes) { for (int j = 0; j < paramTypes.length; j++) paramTypes[j] = TypeUtil.resolveTypeVariable(paramTypes[j], declaringClass, declaringTypes); }
public PropertyDescriptor(String propertyName, Class<?> beanClass) { this.name = propertyName; try { setReadMethod(beanClass, createDefaultMethodName(propertyName, "is")); } catch (Exception e) { setReadMethod(beanClass, createDefaultMethodName(propertyName, "get")); } setWriteMethod(beanClass, createDefaultMethodName(propertyName, "set")); }
/** * Returns a "pretty" XML representation of the root element of this XMap (may be null). * * @return a "pretty" XML representation of the root element of this XMap (may be null). */ @Override public String toString() { return getXMLUtil().toNodeString(root); }
public PropertyDescriptor(String propertyName, Method getter, Method setter) { this.name = propertyName; setReadMethod(getter); setWriteMethod(setter); }
/** * Returns a "pretty" XML representation of the root element of this XMap (may be null). * * @return a "pretty" XML representation of the root element of this XMap (may be null). */ @Override public String toString() { return getXMLUtil().toNodeString(root); }