try { o = classLoader.loadClass(pkg+".ObjectFactory"); classes.add(o); foundObjectFactory = true; } catch (ClassNotFoundException e) {
try { o = classLoader.loadClass(pkg+".ObjectFactory"); classes.add(o); foundObjectFactory = true; } catch (ClassNotFoundException e) {
private void addSubstitutionMember(ElementInfoImpl<T,C,F,M> child) { if(substitutionMembers==null) substitutionMembers = new FinalArrayList<ElementInfoImpl<T,C,F,M>>(); substitutionMembers.add(child); }
@Override public void attribute(int prefix, String localName, String value) throws IOException { otherAttributes.add(new DynamicAttribute(prefix,localName,value)); }
classes.add(classLoader.loadClass(pkg + '.' + className)); } catch (ClassNotFoundException e) { throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e);
@Override public void endStartTag() throws IOException { if(otherAttributes.isEmpty()) { if(len!=0) { // sort is expensive even for size 0 array, // so it's worth checking len==0 if(!namedAttributesAreOrdered) Arrays.sort(staticAttributes,0,len); // this is the common case for( int i=0; i<len; i++ ) staticAttributes[i].write(); len = 0; } } else { // this is the exceptional case // sort all the attributes, not just the other attributes for( int i=0; i<len; i++ ) otherAttributes.add(staticAttributes[i].toDynamicAttribute()); len = 0; Collections.sort(otherAttributes); // write them all int size = otherAttributes.size(); for( int i=0; i<size; i++ ) { DynamicAttribute a = otherAttributes.get(i); super.attribute(a.prefix,a.localName,a.value); } otherAttributes.clear(); } super.endStartTag(); }
properties.add(createAttributeProperty(seed)); return; case VALUE: properties.add(createValueProperty(seed)); return; case ELEMENT: properties.add(createElementProperty(seed)); return; case ELEMENT_REF: properties.add(createReferenceProperty(seed)); return; case MAP: properties.add(createMapProperty(seed)); return; default:
private void addSubstitutionMember(ElementInfoImpl<T,C,F,M> child) { if(substitutionMembers==null) substitutionMembers = new FinalArrayList<ElementInfoImpl<T,C,F,M>>(); substitutionMembers.add(child); }
@Override public void attribute(int prefix, String localName, String value) throws IOException { otherAttributes.add(new DynamicAttribute(prefix,localName,value)); }
classes.add(classLoader.loadClass(pkg + '.' + className)); } catch (ClassNotFoundException e) { throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e);
@Override public void endStartTag() throws IOException { if(otherAttributes.isEmpty()) { if(len!=0) { // sort is expensive even for size 0 array, // so it's worth checking len==0 if(!namedAttributesAreOrdered) Arrays.sort(staticAttributes,0,len); // this is the common case for( int i=0; i<len; i++ ) staticAttributes[i].write(); len = 0; } } else { // this is the exceptional case // sort all the attributes, not just the other attributes for( int i=0; i<len; i++ ) otherAttributes.add(staticAttributes[i].toDynamicAttribute()); len = 0; Collections.sort(otherAttributes); // write them all int size = otherAttributes.size(); for( int i=0; i<size; i++ ) { DynamicAttribute a = otherAttributes.get(i); super.attribute(a.prefix,a.localName,a.value); } otherAttributes.clear(); } super.endStartTag(); }
properties.add(createAttributeProperty(seed)); return; case VALUE: properties.add(createValueProperty(seed)); return; case ELEMENT: properties.add(createElementProperty(seed)); return; case ELEMENT_REF: properties.add(createReferenceProperty(seed)); return; case MAP: properties.add(createMapProperty(seed)); return; default:
private void addSubstitutionMember(ElementInfoImpl<T,C,F,M> child) { if(substitutionMembers==null) substitutionMembers = new FinalArrayList<ElementInfoImpl<T,C,F,M>>(); substitutionMembers.add(child); }
@Override public void attribute(int prefix, String localName, String value) throws IOException { otherAttributes.add(new DynamicAttribute(prefix,localName,value)); }