Пример #1
0
 /*     */ static JaxBeanInfo parseXsiType(
     UnmarshallingContext.State state, TagName ea, @Nullable JaxBeanInfo defaultBeanInfo)
     throws SAXException {
   /*  69 */ UnmarshallingContext context = state.getContext();
   /*  70 */ JaxBeanInfo beanInfo = null;
   /*     */
   /*  73 */ Attributes atts = ea.atts;
   /*  74 */ int idx = atts.getIndex("http://www.w3.org/2001/XMLSchema-instance", "type");
   /*     */
   /*  76 */ if (idx >= 0)
   /*     */ {
     /*  79 */ String value = atts.getValue(idx);
     /*     */
     /*  81 */ QName type = DatatypeConverterImpl._parseQName(value, context);
     /*  82 */ if (type == null) {
       /*  83 */ reportError(Messages.NOT_A_QNAME.format(new Object[] {value}), true);
       /*     */ } else {
       /*  85 */ if ((defaultBeanInfo != null) && (defaultBeanInfo.getTypeNames().contains(type)))
       /*     */ {
         /*  92 */ return defaultBeanInfo;
         /*     */ }
       /*  94 */ beanInfo = context.getJAXBContext().getGlobalType(type);
       /*  95 */ if (beanInfo == null) {
         /*  96 */ String nearest = context.getJAXBContext().getNearestTypeName(type);
         /*  97 */ if (nearest != null)
           /*  98 */ reportError(
               Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(new Object[] {type, nearest}), true);
         /*     */ else {
           /* 100 */ reportError(
               Messages.UNRECOGNIZED_TYPE_NAME.format(new Object[] {type}), true);
           /*     */ }
         /*     */
         /*     */ }
       /*     */
       /*     */ }
     /*     */
     /*     */ }
   /*     */
   /* 112 */ return beanInfo;
   /*     */ }