/** * Construct a new <code>LazyDynaMap</code> based on an exisiting DynaClass * * @param dynaClass DynaClass to copy the name and properties from */ public LazyDynaMap(final DynaClass dynaClass) { this(dynaClass.getName(), dynaClass.getDynaProperties()); }
/** * Construct a new <code>LazyDynaMap</code> based on an exisiting DynaClass * * @param dynaClass DynaClass to copy the name and properties from */ public LazyDynaMap(final DynaClass dynaClass) { this(dynaClass.getName(), dynaClass.getDynaProperties()); }
/** * Construct a new <code>DynaBean</code> associated with the specified * <code>DynaClass</code> instance - if its not a <code>MutableDynaClass</code> * then a new <code>LazyDynaClass</code> is created and the properties copied. * * @param dynaClass The DynaClass we are associated with */ public LazyDynaBean(final DynaClass dynaClass) { values = newMap(); if (dynaClass instanceof MutableDynaClass) { this.dynaClass = (MutableDynaClass)dynaClass; } else { this.dynaClass = new LazyDynaClass(dynaClass.getName(), dynaClass.getDynaProperties()); } }
/** * Construct a new <code>DynaBean</code> associated with the specified * <code>DynaClass</code> instance - if its not a <code>MutableDynaClass</code> * then a new <code>LazyDynaClass</code> is created and the properties copied. * * @param dynaClass The DynaClass we are associated with */ public LazyDynaBean(final DynaClass dynaClass) { values = newMap(); if (dynaClass instanceof MutableDynaClass) { this.dynaClass = (MutableDynaClass)dynaClass; } else { this.dynaClass = new LazyDynaClass(dynaClass.getName(), dynaClass.getDynaProperties()); } }
/** * Construct a new <code>LazyDynaMap</code> based on an exisiting DynaClass * * @param dynaClass DynaClass to copy the name and properties from */ public LazyDynaMap(DynaClass dynaClass) { this(dynaClass.getName(), dynaClass.getDynaProperties()); }
/** * Construct a new <code>LazyDynaMap</code> based on an exisiting DynaClass * * @param dynaClass DynaClass to copy the name and properties from */ public LazyDynaMap(final DynaClass dynaClass) { this(dynaClass.getName(), dynaClass.getDynaProperties()); }
/** * Construct a new <code>LazyDynaMap</code> based on an exisiting DynaClass * * @param dynaClass DynaClass to copy the name and properties from */ public LazyDynaMap(DynaClass dynaClass) { this(dynaClass.getName(), dynaClass.getDynaProperties()); }
/** * Construct a new <code>LazyDynaMap</code> based on an exisiting DynaClass * * @param dynaClass DynaClass to copy the name and properties from */ public LazyDynaMap(DynaClass dynaClass) { this(dynaClass.getName(), dynaClass.getDynaProperties()); }
/** * Explicitly resolves the getter bypassing commons.beanutils * * @param beanClass * @param propertyName * @return getter method of the property * @throws ClassNotFoundException if class forName fails * @throws NoSuchMethodException if there is no getter * @throws SecurityException if there are constraints by the security * manager */ private static Method obtainGetterOfProperty(DynaClass beanClass, String propertyName) throws ClassNotFoundException, NoSuchMethodException, SecurityException { Class<?> clazz = Class.forName(beanClass.getName()); return clazz.getMethod("get" + firstLetterUppercase(propertyName)); }
/** * Writes the beans contained in the given iterator. * * @param beans The beans iterator */ public void write(Iterator beans) throws DataWriterException { while (beans.hasNext()) { DynaBean bean = (DynaBean)beans.next(); if (bean instanceof SqlDynaBean) { write((SqlDynaBean)bean); } else { _log.warn("Cannot write normal dyna beans (type: "+bean.getDynaClass().getName()+")"); } } }
/** * {@inheritDoc} */ public String toString() { StringBuilder result = new StringBuilder(); DynaClass type = getDynaClass(); DynaProperty[] props = type.getDynaProperties(); result.append(type.getName()); result.append(": "); for (int idx = 0; idx < props.length; idx++) { if (idx > 0) { result.append(", "); } result.append(props[idx].getName()); result.append(" = "); result.append(get(props[idx].getName())); } return result.toString(); }
sb.append(dynaClass.getName()); DynaProperty props[] = dynaClass.getDynaProperties(); if (props == null) {
/** * Construct a new <code>DynaBean</code> associated with the specified * <code>DynaClass</code> instance - if its not a <code>MutableDynaClass</code> * then a new <code>LazyDynaClass</code> is created and the properties copied. * * @param dynaClass The DynaClass we are associated with */ public LazyDynaBean(DynaClass dynaClass) { values = newMap(); if (dynaClass instanceof MutableDynaClass) { this.dynaClass = (MutableDynaClass)dynaClass; } else { this.dynaClass = new LazyDynaClass(dynaClass.getName(), dynaClass.getDynaProperties()); } }
/** * Construct a new <code>DynaBean</code> associated with the specified * <code>DynaClass</code> instance - if its not a <code>MutableDynaClass</code> * then a new <code>LazyDynaClass</code> is created and the properties copied. * * @param dynaClass The DynaClass we are associated with */ public LazyDynaBean(final DynaClass dynaClass) { values = newMap(); if (dynaClass instanceof MutableDynaClass) { this.dynaClass = (MutableDynaClass)dynaClass; } else { this.dynaClass = new LazyDynaClass(dynaClass.getName(), dynaClass.getDynaProperties()); } }
/** * Construct a new <code>DynaBean</code> associated with the specified * <code>DynaClass</code> instance - if its not a <code>MutableDynaClass</code> * then a new <code>LazyDynaClass</code> is created and the properties copied. * * @param dynaClass The DynaClass we are associated with */ public LazyDynaBean(DynaClass dynaClass) { values = newMap(); if (dynaClass instanceof MutableDynaClass) { this.dynaClass = (MutableDynaClass)dynaClass; } else { this.dynaClass = new LazyDynaClass(dynaClass.getName(), dynaClass.getDynaProperties()); } }
/** * Construct a new <code>DynaBean</code> associated with the specified * <code>DynaClass</code> instance - if its not a <code>MutableDynaClass</code> * then a new <code>LazyDynaClass</code> is created and the properties copied. * * @param dynaClass The DynaClass we are associated with */ public LazyDynaBean(DynaClass dynaClass) { values = newMap(); if (dynaClass instanceof MutableDynaClass) { this.dynaClass = (MutableDynaClass)dynaClass; } else { this.dynaClass = new LazyDynaClass(dynaClass.getName(), dynaClass.getDynaProperties()); } }
className = ((DynaBean) instance).getDynaClass().getName(); canReuse = className.equals(config.getName()); formType = "DynaActionForm";
if (form != null) { if (this.getDynamic()) { String className = ((DynaBean) form).getDynaClass().getName();
String name = getDynaClass().getName();
if (resolver.isIndexed(next) || resolver.isMapped(next)) { String property = resolver.getProperty(next); Class<?> clazz = Class.forName(bean.getName()); Class<?> detectTypeParameter = detectTypeParameter(clazz, property, resolver.isIndexed(name) ? 0 : 1); Class<?> clazz = Class.forName(bean.getName()); return detectTypeParameter(clazz, property, resolver.isIndexed(name) ? 0 : 1);