/*     */ public static <T> TransducedAccessor<T> get(
     JAXBContextImpl context, RuntimeNonElementRef ref)
       /*     */ {
   /* 142 */ Transducer xducer = RuntimeModelBuilder.createTransducer(ref);
   /* 143 */ RuntimePropertyInfo prop = ref.getSource();
   /*     */
   /* 145 */ if (prop.isCollection()) {
     /* 146 */ return new ListTransducedAccessorImpl(
         xducer,
         prop.getAccessor(),
         Lister.create(
             Navigator.REFLECTION.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
     /*     */ }
   /*     */
   /* 151 */ if (prop.id() == ID.IDREF) {
     /* 152 */ return new IDREFTransducedAccessorImpl(prop.getAccessor());
     /*     */ }
   /* 154 */ if ((xducer.isDefault()) && (context != null) && (!context.fastBoot)) {
     /* 155 */ TransducedAccessor xa = OptimizedTransducedAccessorFactory.get(prop);
     /* 156 */ if (xa != null) return xa;
     /*     */ }
   /*     */
   /* 159 */ if (xducer.useNamespace()) {
     /* 160 */ return new CompositeContextDependentTransducedAccessorImpl(
         context, xducer, prop.getAccessor());
     /*     */ }
   /* 162 */ return new CompositeTransducedAccessorImpl(context, xducer, prop.getAccessor());
   /*     */ }
예제 #2
0
  protected ArrayProperty(JAXBContextImpl context, RuntimePropertyInfo prop) {
    super(context, prop);

    assert prop.isCollection();
    lister =
        Lister.create(
            Navigator.REFLECTION.erasure(prop.getRawType()), prop.id(), prop.getAdapter());
    assert lister != null;
    acc = prop.getAccessor().optimize(context);
    assert acc != null;
  }