com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl Java Examples
The following examples show how to use
com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StructureLoader.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #2
Source File: SAXConnector.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public void startElement(String uri, String local, String qname, Attributes atts) throws SAXException { if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "SAXConnector.startElement: {0}:{1}:{2}, attrs: {3}", new Object[]{uri, local, qname, atts}); } // work gracefully with misconfigured parsers that don't support namespaces if( uri==null || uri.length()==0 ) uri=""; if( local==null || local.length()==0 ) local=qname; if( qname==null || qname.length()==0 ) qname=local; boolean ignorable = true; StructureLoader sl; // not null only if element content is processed (StructureLoader is used) // ugly if((sl = this.context.getStructureLoader()) != null) { ignorable = ((ClassBeanInfoImpl)sl.getBeanInfo()).hasElementOnlyContentModel(); } processText(ignorable); tagName.uri = uri; tagName.local = local; tagName.qname = qname; tagName.atts = atts; next.startElement(tagName); }
Example #3
Source File: StructureLoader.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #4
Source File: SAXConnector.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public void startElement(String uri, String local, String qname, Attributes atts) throws SAXException { if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "SAXConnector.startElement: {0}:{1}:{2}, attrs: {3}", new Object[]{uri, local, qname, atts}); } // work gracefully with misconfigured parsers that don't support namespaces if( uri==null || uri.length()==0 ) uri=""; if( local==null || local.length()==0 ) local=qname; if( qname==null || qname.length()==0 ) qname=local; boolean ignorable = true; StructureLoader sl; // not null only if element content is processed (StructureLoader is used) // ugly if((sl = this.context.getStructureLoader()) != null) { ignorable = ((ClassBeanInfoImpl)sl.getBeanInfo()).hasElementOnlyContentModel(); } processText(ignorable); tagName.uri = uri; tagName.local = local; tagName.qname = qname; tagName.atts = atts; next.startElement(tagName); }
Example #5
Source File: StructureLoader.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #6
Source File: StructureLoader.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #7
Source File: StructureLoader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #8
Source File: StructureLoader.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #9
Source File: StructureLoader.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #10
Source File: StructureLoader.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Completes the initialization. * * <p> * To fix the cyclic reference issue, the main part of the initialization needs to be done * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}. */ public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) { UnmarshallerChain chain = new UnmarshallerChain(context); for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) { for (int i = bi.properties.length - 1; i >= 0; i--) { Property p = bi.properties[i]; switch(p.getKind()) { case ATTRIBUTE: if(attUnmarshallers==null) attUnmarshallers = new QNameMap<TransducedAccessor>(); AttributeProperty ap = (AttributeProperty) p; attUnmarshallers.put(ap.attName.toQName(),ap.xacc); break; case ELEMENT: case REFERENCE: case MAP: case VALUE: p.buildChildElementUnmarshallers(chain,childUnmarshallers); break; } } } this.frameSize = chain.getScopeSize(); textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER); catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL); if(attWildcard!=null) { attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard; // we use attUnmarshallers==null as a sign to skip the attribute processing // altogether, so if we have an att wildcard we need to have an empty qname map. if(attUnmarshallers==null) attUnmarshallers = EMPTY; } else { attCatchAll = null; } }
Example #11
Source File: StructureLoader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }
Example #12
Source File: StructureLoader.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }
Example #13
Source File: StructureLoader.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }
Example #14
Source File: StructureLoader.java From hottub with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }
Example #15
Source File: StructureLoader.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }
Example #16
Source File: StructureLoader.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }
Example #17
Source File: StructureLoader.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }
Example #18
Source File: StructureLoader.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public StructureLoader(ClassBeanInfoImpl beanInfo) { super(true); this.beanInfo = beanInfo; }