PrefixedName getAttrPName() { return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName); }
public static PrefixedName valueOf(QName n) { return new PrefixedName(n.getPrefix(), n.getLocalPart()); }
/** * Method used to 'intern()' qualified names; main benefit is reduced * memory usage as the name objects are shared. May also slightly * speed up Map access, as more often identity comparisons catch * matches. *<p> * Note: it is assumed at this point that access is only from a single * thread, and non-recursive -- generally valid assumption as readers are * not shared. Restriction is needed since the method is not re-entrant: * it uses mAccessKey during the method call. */ private PrefixedName findSharedName(String prefix, String localName) { HashMap m = mSharedNames; if (mSharedNames == null) { mSharedNames = m = new HashMap(); } else { // Maybe we already have a shared instance... ? PrefixedName key = mAccessKey; key.reset(prefix, localName); key = (PrefixedName) m.get(key); if (key != null) { // gotcha return key; } } // Not found; let's create, cache and return it: PrefixedName result = new PrefixedName(prefix, localName); m.put(result, result); return result; }
PrefixedName getAttrPName() { return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName); }
PrefixedName getAttrPName() { return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName); }
PrefixedName getAttrPName() { return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName); }
PrefixedName getAttrPName() { return new PrefixedName(mCurrAttrPrefix, mCurrAttrLocalName); }
public static PrefixedName valueOf(QName n) { return new PrefixedName(n.getPrefix(), n.getLocalPart()); }
public static PrefixedName valueOf(QName n) { return new PrefixedName(n.getPrefix(), n.getLocalPart()); }
public static PrefixedName valueOf(QName n) { return new PrefixedName(n.getPrefix(), n.getLocalPart()); }
public static PrefixedName valueOf(QName n) { return new PrefixedName(n.getPrefix(), n.getLocalPart()); }
/** * Method used to 'intern()' qualified names; main benefit is reduced * memory usage as the name objects are shared. May also slightly * speed up Map access, as more often identity comparisons catch * matches. *<p> * Note: it is assumed at this point that access is only from a single * thread, and non-recursive -- generally valid assumption as readers are * not shared. Restriction is needed since the method is not re-entrant: * it uses mAccessKey during the method call. */ private PrefixedName findSharedName(String prefix, String localName) { HashMap<PrefixedName,PrefixedName> m = mSharedNames; if (mSharedNames == null) { mSharedNames = m = new HashMap<PrefixedName,PrefixedName>(); } else { // Maybe we already have a shared instance... ? PrefixedName key = mAccessKey; key.reset(prefix, localName); key = m.get(key); if (key != null) { // gotcha return key; } } // Not found; let's create, cache and return it: PrefixedName result = new PrefixedName(prefix, localName); m.put(result, result); return result; }
/** * Method used to 'intern()' qualified names; main benefit is reduced * memory usage as the name objects are shared. May also slightly * speed up Map access, as more often identity comparisons catch * matches. *<p> * Note: it is assumed at this point that access is only from a single * thread, and non-recursive -- generally valid assumption as readers are * not shared. Restriction is needed since the method is not re-entrant: * it uses mAccessKey during the method call. */ private PrefixedName findSharedName(String prefix, String localName) { HashMap<PrefixedName,PrefixedName> m = mSharedNames; if (mSharedNames == null) { mSharedNames = m = new HashMap<PrefixedName,PrefixedName>(); } else { // Maybe we already have a shared instance... ? PrefixedName key = mAccessKey; key.reset(prefix, localName); key = m.get(key); if (key != null) { // gotcha return key; } } // Not found; let's create, cache and return it: PrefixedName result = new PrefixedName(prefix, localName); m.put(result, result); return result; }
/** * Method used to 'intern()' qualified names; main benefit is reduced * memory usage as the name objects are shared. May also slightly * speed up Map access, as more often identity comparisons catch * matches. *<p> * Note: it is assumed at this point that access is only from a single * thread, and non-recursive -- generally valid assumption as readers are * not shared. Restriction is needed since the method is not re-entrant: * it uses mAccessKey during the method call. */ private PrefixedName findSharedName(String prefix, String localName) { HashMap<PrefixedName,PrefixedName> m = mSharedNames; if (mSharedNames == null) { mSharedNames = m = new HashMap<PrefixedName,PrefixedName>(); } else { // Maybe we already have a shared instance... ? PrefixedName key = mAccessKey; key.reset(prefix, localName); key = m.get(key); if (key != null) { // gotcha return key; } } // Not found; let's create, cache and return it: PrefixedName result = new PrefixedName(prefix, localName); m.put(result, result); return result; }
/** * Method used to 'intern()' qualified names; main benefit is reduced * memory usage as the name objects are shared. May also slightly * speed up Map access, as more often identity comparisons catch * matches. *<p> * Note: it is assumed at this point that access is only from a single * thread, and non-recursive -- generally valid assumption as readers are * not shared. Restriction is needed since the method is not re-entrant: * it uses mAccessKey during the method call. */ private PrefixedName findSharedName(String prefix, String localName) { HashMap m = mSharedNames; if (mSharedNames == null) { mSharedNames = m = new HashMap(); } else { // Maybe we already have a shared instance... ? PrefixedName key = mAccessKey; key.reset(prefix, localName); key = (PrefixedName) m.get(key); if (key != null) { // gotcha return key; } } // Not found; let's create, cache and return it: PrefixedName result = new PrefixedName(prefix, localName); m.put(result, result); return result; }