public boolean isNode() { return Common.isBean(this.type); }
public boolean isBean() { return Common.isBean(this.type); }
public boolean isBean() { return Common.isBean(this.type); }
if (Common.isBean(this.type)) { try { Constructor c = null;
/** */ void register(BeanProp prop, Object value) { BeanProperty bp = new BeanProperty(prop); if (Common.isBean(prop.type)) ((BaseBean)value).setDomBinding(this); this.prop = bp; if (DDLogFlags.debug) { TraceLogger.put(TraceLogger.DEBUG, TraceLogger.SVC_DD, DDLogFlags.DBG_BLD, 1, DDLogFlags.BINDPROP, "property " + prop.getDtdName() + " bound to B(" + this.hashCode() + ")"); } // // Following is a little trick to deal with attribute that are not // defined in the dtd. When we register this new element, we ask // for all the attributes and add them dynamically, as transient, // to the BeanProp list of attributes. // if (this.node != null) { NamedNodeMap l = this.node.getAttributes(); for (int i=0; i<l.getLength(); i++) { Node n = l.item(i); prop.createTransientAttribute(n.getNodeName()); } } }
this.ored = ored; this.constName = constName; this.isBean = Common.isBean(type); if (isScalar()) { this.classType = Common.wrapperClass(type);
if (Common.isBean(matchingProp.type)) bean = (BaseBean)newBinding.getBean(matchingProp); else
/** * Get the bean using its unique identifier. This identifier is not * the indexed position of the element in the array but a unique id * associated to the DOMBinding object (see the BeanProp and DOMBinding * classes) */ public Bean propertyById(String name, int id) { BeanProp bp = this.beanProp(name); if (Common.isBean(bp.type)) { if (Common.isArray(bp.type)) return (BaseBean)bp.getValueById(id); else return (BaseBean)bp.getValue(0); } else throw new IllegalStateException(Common. getMessage("PropertyIsNotABean_msg", name)); }
oldValue = this.getValue(prop); if (Common.isBean(prop.type)) bp.value = value; else
/** * Returns the position of the indexed property element. * If the type of the property is a bean, use the == comparison, * else use the equals() method. * If the element is not found, return -1. */ public int indexOf(String name, Object value) throws Schema2BeansRuntimeException { BeanProp bp = this.beanProp(name); if (bp == null) throw new Schema2BeansRuntimeException(Common. getMessage("UnknownPropertyName_msg", name)); if (Common.isArray(bp.type)) { boolean isBean = Common.isBean(bp.type); int size = bp.size(); for (int i=0; i<size; i++) { Object obj = bp.getValue(i); if (isBean && (obj == value)) return i; else if (!isBean && (obj.equals(value))) return i; } } return -1; }
if (Common.isBean(this.type)) Array.set(oldValue, i, ((BaseBean)o).clone()); else
boolean isBean = Common.isBean(prop.type); Object o1, o2, o3; boolean hasKey = false;
this.checkParams(index, value, add); if ((value != null) && Common.isBean(this.type) && ((BaseBean)value).hasDomNode()) { Document doc1 = null; if (Common.isBean(this.type) && !add) this.removeElement(index, false); if (Common.isBean(this.type) && (value != null)) { BaseBean bb = (BaseBean)value; String[] names = bb.cachedAttributeNames();
if (!Common.isBean(be.type) && config.isAttributesAsProperties()) { addAttrProps(bc, attrs, name, usedNames,
boolean isBean = Common.isBean(prop.type); boolean isKey = Common.isKey(prop.type) || !useKeys; Object o1, o2, o3;
e.setWrapperClass(Common.wrapperClass(be.type)); suggestedJavaType = e.getWrapperClass(); } else if (be != rootElement && !Common.isBean(be.type)) { e.setWrapperClass(be.typeToString()); suggestedJavaType = e.getWrapperClass();