/** * Wraps up everything and creates {@link NameList}. */ public NameList conclude() { boolean[] nsUriCannotBeDefaulted = new boolean[uriIndexMap.size()]; for (Map.Entry<String,Integer> e : uriIndexMap.entrySet()) { nsUriCannotBeDefaulted[e.getValue()] = nonDefaultableNsUris.contains(e.getKey()); } NameList r = new NameList( list(uriIndexMap), nsUriCannotBeDefaulted, list(localNameIndexMap), elementQNameIndexMap.size(), attributeQNameIndexMap.size() ); // delete them so that the create method can never be called again uriIndexMap = null; localNameIndexMap = null; return r; }
private int allocIndex(QNameMap<Integer> map, String nsUri, String localName) { Integer i = map.get(nsUri,localName); if(i==null) { i = map.size(); map.put(nsUri,localName,i); } return i; }
/** * Copies all of the mappings from the specified map to this map * These mappings will replace any mappings that * this map had for any of the keys currently in the specified map. * * @param map mappings to be stored in this map. * */ public QNameMap<V> putAll(QNameMap<? extends V> map) { int numKeysToBeAdded = map.size(); if (numKeysToBeAdded == 0) return this; if (numKeysToBeAdded > threshold) { int targetCapacity = numKeysToBeAdded; if (targetCapacity > MAXIMUM_CAPACITY) targetCapacity = MAXIMUM_CAPACITY; int newCapacity = table.length; while (newCapacity < targetCapacity) newCapacity <<= 1; if (newCapacity > table.length) resize(newCapacity); } for( Entry<? extends V> e : map.entrySet() ) put(e.nsUri,e.localName,e.getValue()); return this; }
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // this has to be done lazily to avoid cyclic reference issue UnmarshallerChain c = new UnmarshallerChain(context); QNameMap<ChildLoader> result = new QNameMap<ChildLoader>(); property.buildChildElementUnmarshallers(c,result); if(result.size()==1) // for ElementBeanInfoImpl created from RuntimeElementInfo this.loader = new IntercepterLoader(result.getOne().getValue().loader); else // for special ElementBeanInfoImpl only used for marshalling this.loader = Discarder.INSTANCE; } return loader; }
/** * Wraps up everything and creates {@link NameList}. */ public NameList conclude() { boolean[] nsUriCannotBeDefaulted = new boolean[uriIndexMap.size()]; for (Map.Entry<String,Integer> e : uriIndexMap.entrySet()) { nsUriCannotBeDefaulted[e.getValue()] = nonDefaultableNsUris.contains(e.getKey()); } NameList r = new NameList( list(uriIndexMap), nsUriCannotBeDefaulted, list(localNameIndexMap), elementQNameIndexMap.size(), attributeQNameIndexMap.size() ); // delete them so that the create method can never be called again uriIndexMap = null; localNameIndexMap = null; return r; }
private int allocIndex(QNameMap<Integer> map, String nsUri, String localName) { Integer i = map.get(nsUri,localName); if(i==null) { i = map.size(); map.put(nsUri,localName,i); } return i; }
/** * Copies all of the mappings from the specified map to this map * These mappings will replace any mappings that * this map had for any of the keys currently in the specified map. * * @param map mappings to be stored in this map. * */ public QNameMap<V> putAll(QNameMap<? extends V> map) { int numKeysToBeAdded = map.size(); if (numKeysToBeAdded == 0) return this; if (numKeysToBeAdded > threshold) { int targetCapacity = numKeysToBeAdded; if (targetCapacity > MAXIMUM_CAPACITY) targetCapacity = MAXIMUM_CAPACITY; int newCapacity = table.length; while (newCapacity < targetCapacity) newCapacity <<= 1; if (newCapacity > table.length) resize(newCapacity); } for( Entry<? extends V> e : map.entrySet() ) put(e.nsUri,e.localName,e.getValue()); return this; }
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // this has to be done lazily to avoid cyclic reference issue UnmarshallerChain c = new UnmarshallerChain(context); QNameMap<ChildLoader> result = new QNameMap<ChildLoader>(); property.buildChildElementUnmarshallers(c,result); if(result.size()==1) // for ElementBeanInfoImpl created from RuntimeElementInfo this.loader = new IntercepterLoader(result.getOne().getValue().loader); else // for special ElementBeanInfoImpl only used for marshalling this.loader = Discarder.INSTANCE; } return loader; }
/** * Wraps up everything and creates {@link NameList}. */ public NameList conclude() { boolean[] nsUriCannotBeDefaulted = new boolean[uriIndexMap.size()]; for (Map.Entry<String,Integer> e : uriIndexMap.entrySet()) { nsUriCannotBeDefaulted[e.getValue()] = nonDefaultableNsUris.contains(e.getKey()); } NameList r = new NameList( list(uriIndexMap), nsUriCannotBeDefaulted, list(localNameIndexMap), elementQNameIndexMap.size(), attributeQNameIndexMap.size() ); // delete them so that the create method can never be called again uriIndexMap = null; localNameIndexMap = null; return r; }
/** * Wraps up everything and creates {@link NameList}. */ public NameList conclude() { boolean[] nsUriCannotBeDefaulted = new boolean[uriIndexMap.size()]; for (Map.Entry<String,Integer> e : uriIndexMap.entrySet()) { nsUriCannotBeDefaulted[e.getValue()] = nonDefaultableNsUris.contains(e.getKey()); } NameList r = new NameList( list(uriIndexMap), nsUriCannotBeDefaulted, list(localNameIndexMap), elementQNameIndexMap.size(), attributeQNameIndexMap.size() ); // delete them so that the create method can never be called again uriIndexMap = null; localNameIndexMap = null; return r; }
private int allocIndex(QNameMap<Integer> map, String nsUri, String localName) { Integer i = map.get(nsUri,localName); if(i==null) { i = map.size(); map.put(nsUri,localName,i); } return i; }
private int allocIndex(QNameMap<Integer> map, String nsUri, String localName) { Integer i = map.get(nsUri,localName); if(i==null) { i = map.size(); map.put(nsUri,localName,i); } return i; }
/** * Copies all of the mappings from the specified map to this map * These mappings will replace any mappings that * this map had for any of the keys currently in the specified map. * * @param map mappings to be stored in this map. * */ public QNameMap<V> putAll(QNameMap<? extends V> map) { int numKeysToBeAdded = map.size(); if (numKeysToBeAdded == 0) return this; if (numKeysToBeAdded > threshold) { int targetCapacity = numKeysToBeAdded; if (targetCapacity > MAXIMUM_CAPACITY) targetCapacity = MAXIMUM_CAPACITY; int newCapacity = table.length; while (newCapacity < targetCapacity) newCapacity <<= 1; if (newCapacity > table.length) resize(newCapacity); } for( Entry<? extends V> e : map.entrySet() ) put(e.nsUri,e.localName,e.getValue()); return this; }
/** * Copies all of the mappings from the specified map to this map * These mappings will replace any mappings that * this map had for any of the keys currently in the specified map. * * @param map mappings to be stored in this map. * */ public QNameMap<V> putAll(QNameMap<? extends V> map) { int numKeysToBeAdded = map.size(); if (numKeysToBeAdded == 0) return this; if (numKeysToBeAdded > threshold) { int targetCapacity = numKeysToBeAdded; if (targetCapacity > MAXIMUM_CAPACITY) targetCapacity = MAXIMUM_CAPACITY; int newCapacity = table.length; while (newCapacity < targetCapacity) newCapacity <<= 1; if (newCapacity > table.length) resize(newCapacity); } for( Entry<? extends V> e : map.entrySet() ) put(e.nsUri,e.localName,e.getValue()); return this; }
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // this has to be done lazily to avoid cyclic reference issue UnmarshallerChain c = new UnmarshallerChain(context); QNameMap<ChildLoader> result = new QNameMap<ChildLoader>(); property.buildChildElementUnmarshallers(c,result); if(result.size()==1) // for ElementBeanInfoImpl created from RuntimeElementInfo this.loader = new IntercepterLoader(result.getOne().getValue().loader); else // for special ElementBeanInfoImpl only used for marshalling this.loader = Discarder.INSTANCE; } return loader; }
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) { if(loader==null) { // this has to be done lazily to avoid cyclic reference issue UnmarshallerChain c = new UnmarshallerChain(context); QNameMap<ChildLoader> result = new QNameMap<ChildLoader>(); property.buildChildElementUnmarshallers(c,result); if(result.size()==1) // for ElementBeanInfoImpl created from RuntimeElementInfo this.loader = new IntercepterLoader(result.getOne().getValue().loader); else // for special ElementBeanInfoImpl only used for marshalling this.loader = Discarder.INSTANCE; } return loader; }