Пример #1
0
 public UUID parse(CharSequence text) throws SAXException {
   TODO.checkSpec("JSR222 Issue #42");
   try {
     return UUID.fromString(WhiteSpaceProcessor.trim(text).toString());
   } catch (IllegalArgumentException e) {
     UnmarshallingContext.getInstance().handleError(e);
     return null;
   }
 }
 /*     */ public void parse(final BeanT bean, CharSequence lexical)
     throws AccessorException, SAXException {
   /* 293 */ final String idref = WhiteSpaceProcessor.trim(lexical).toString();
   /* 294 */ final UnmarshallingContext context = UnmarshallingContext.getInstance();
   /*     */
   /* 296 */ final Callable callable = context.getObjectFromId(idref, this.acc.valueType);
   /* 297 */ if (callable == null)
   /*     */ {
     /* 299 */ context.errorUnresolvedIDREF(bean, idref, context.getLocator());
     /*     */ return;
     /*     */ }
   /*     */ Object t;
   /*     */ try {
     /* 305 */ t = callable.call();
     /*     */ } catch (SAXException e) {
     /* 307 */ throw e;
     /*     */ } catch (RuntimeException e) {
     /* 309 */ throw e;
     /*     */ } catch (Exception e) {
     /* 311 */ throw new SAXException2(e);
     /*     */ }
   /* 313 */ if (t != null) {
     /* 314 */ assign(bean, t, context);
     /*     */ }
   /*     */ else {
     /* 317 */ final LocatorEx loc = new LocatorEx.Snapshot(context.getLocator());
     /* 318 */ context.addPatcher(
         new Patcher() {
           /*     */ public void run() throws SAXException {
             /*     */ try {
               /* 321 */ Object t = callable.call();
               /* 322 */ if (t == null) /* 323 */ context.errorUnresolvedIDREF(bean, idref, loc);
               /*     */ else
                 /* 325 */ TransducedAccessor.IDREFTransducedAccessorImpl.this.assign(
                     bean, t, context);
               /*     */ }
             /*     */ catch (AccessorException e) {
               /* 328 */ context.handleError(e);
               /*     */ } catch (SAXException e) {
               /* 330 */ throw e;
               /*     */ } catch (RuntimeException e) {
               /* 332 */ throw e;
               /*     */ } catch (Exception e) {
               /* 334 */ throw new SAXException2(e);
               /*     */ }
             /*     */ }
           /*     */ });
     /*     */ }
   /*     */ }