public final boolean equals(Object obj) { if (!isImmutable()) return super.equals(obj); if (!(obj instanceof XmlObject)) return false; XmlObject xmlobj = (XmlObject)obj; if (!xmlobj.isImmutable()) return false; return valueEquals(xmlobj); }
public final int hashCode() { if (!isImmutable()) return super.hashCode(); synchronized (monitor()) { if (isNil()) return 0; return value_hash_code(); } }
if (target.isImmutable()) throw new IllegalStateException("Cannot set the value of an immutable XmlObject"); if (target.isImmutable()) throw new IllegalStateException("Cannot set the value of an immutable XmlObject");
/** * Same as copy() but unsynchronized. * If Locale.COPY_USE_NEW_LOCALE is set in the options, a new locale will be created for the copy. * Warning: Using this method in mutithreaded environment can cause invalid states. */ public final XmlObject _copy(XmlOptions xmlOptions) { // immutable objects don't get copied. They're immutable if (isImmutable()) return this; check_orphaned(); SchemaTypeLoader stl = get_store().get_schematypeloader(); XmlObject result = (XmlObject)get_store().copy(stl, schemaType(), xmlOptions); return result; }
/** * Same as set() but unsynchronized. * Warning: Using this method in mutithreaded environment can cause invalid states. */ public final XmlObject _set(XmlObject src) { if (isImmutable()) throw new IllegalStateException("Cannot set the value of an immutable XmlObject"); XmlObjectBase obj = underlying(src); TypeStoreUser newObj = this; if (obj == null) { setNil(); return this; } if (obj.isImmutable()) set(obj.stringValue()); else { check_orphaned(); obj.check_orphaned(); newObj = get_store().copy_contents_from( obj.get_store() ). get_store().change_type( obj.schemaType() ); } return (XmlObject) newObj; }
public String getStringValue() { if (isImmutable()) { if ((_flags & FLAG_NIL) != 0) return null; return compute_text(null); } // Since complex-content types don't have a "natural" string value, we // emit the deeply concatenated, tag-removed content of the tag. synchronized (monitor()) { if (_isComplexContent()) return get_store().fetch_text(TypeStore.WS_PRESERVE); check_dated(); if ((_flags & FLAG_NIL) != 0) return null; return compute_text(has_store() ? get_store() : null); } }
public final XmlObject set(XmlObject src) if (isImmutable()) throw new IllegalStateException("Cannot set the value of an immutable XmlObject"); if (obj.isImmutable()) setStringValue(obj.getStringValue()); else
public final boolean equals(Object obj) { if (!isImmutable()) return super.equals(obj); if (!(obj instanceof XmlObject)) return false; XmlObject xmlobj = (XmlObject)obj; if (!xmlobj.isImmutable()) return false; return valueEquals(xmlobj); }
public final boolean equals(Object obj) { if (!isImmutable()) return super.equals(obj); if (!(obj instanceof XmlObject)) return false; XmlObject xmlobj = (XmlObject)obj; if (!xmlobj.isImmutable()) return false; return valueEquals(xmlobj); }
public final int hashCode() { if (!isImmutable()) return super.hashCode(); synchronized (monitor()) { if (isNil()) return 0; return value_hash_code(); } }
public final int hashCode() { if (!isImmutable()) return super.hashCode(); synchronized (monitor()) { if (isNil()) return 0; return value_hash_code(); } }
/** * Same as set() but unsynchronized. * Warning: Using this method in mutithreaded environment can cause invalid states. */ public final XmlObject _set(XmlObject src) { if (isImmutable()) throw new IllegalStateException("Cannot set the value of an immutable XmlObject"); XmlObjectBase obj = underlying(src); TypeStoreUser newObj = this; if (obj == null) { setNil(); return this; } if (obj.isImmutable()) set(obj.stringValue()); else newObj = setterHelper( obj ); return (XmlObject) newObj; }
if (srcObj.isImmutable())
/** * Same as copy() but unsynchronized. * If Locale.COPY_USE_NEW_LOCALE is set in the options, a new locale will be created for the copy. * Warning: Using this method in mutithreaded environment can cause invalid states. */ public final XmlObject _copy(XmlOptions xmlOptions) { // immutable objects don't get copied. They're immutable if (isImmutable()) return this; check_orphaned(); SchemaTypeLoader stl = get_store().get_schematypeloader(); XmlObject result = (XmlObject)get_store().copy(stl, schemaType(), xmlOptions); return result; }
/** * Same as set() but unsynchronized. * Warning: Using this method in mutithreaded environment can cause invalid states. */ public final XmlObject _set(XmlObject src) { if (isImmutable()) throw new IllegalStateException("Cannot set the value of an immutable XmlObject"); XmlObjectBase obj = underlying(src); TypeStoreUser newObj = this; if (obj == null) { setNil(); return this; } if (obj.isImmutable()) set(obj.stringValue()); else { check_orphaned(); obj.check_orphaned(); newObj = get_store().copy_contents_from( obj.get_store() ). get_store().change_type( obj.schemaType() ); } return (XmlObject) newObj; }
/** * Same as copy() but unsynchronized. * If Locale.COPY_USE_NEW_LOCALE is set in the options, a new locale will be created for the copy. * Warning: Using this method in mutithreaded environment can cause invalid states. */ public final XmlObject _copy(XmlOptions xmlOptions) { // immutable objects don't get copied. They're immutable if (isImmutable()) return this; check_orphaned(); SchemaTypeLoader stl = get_store().get_schematypeloader(); XmlObject result = (XmlObject)get_store().copy(stl, schemaType(), xmlOptions); return result; }
public String getStringValue() { if (isImmutable()) { if ((_flags & FLAG_NIL) != 0) return null; return compute_text(null); } // Since complex-content types don't have a "natural" string value, we // emit the deeply concatenated, tag-removed content of the tag. synchronized (monitor()) { if (_isComplexContent()) return get_store().fetch_text(TypeStore.WS_PRESERVE); check_dated(); if ((_flags & FLAG_NIL) != 0) return null; return compute_text(has_store() ? get_store() : null); } }
public String getStringValue() { if (isImmutable()) { if ((_flags & FLAG_NIL) != 0) return null; return compute_text(null); } // Since complex-content types don't have a "natural" string value, we // emit the deeply concatenated, tag-removed content of the tag. synchronized (monitor()) { if (_isComplexContent()) return get_store().fetch_text(TypeStore.WS_PRESERVE); check_dated(); if ((_flags & FLAG_NIL) != 0) return null; return compute_text(has_store() ? get_store() : null); } }