*
* <p>
* This allows the implementation to use an optimized code.
*/
public static <T> TransducedAccessor<T> get(JAXBContextImpl context, RuntimeNonElementRef ref) {
Transducer xducer = RuntimeModelBuilder.createTransducer(ref);
RuntimePropertyInfo prop = ref.getSource();
if(prop.isCollection()) {
return new ListTransducedAccessorImpl(xducer,prop.getAccessor(),
Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),
prop.getAdapter()));
}
if(prop.id()==ID.IDREF)
return new IDREFTransducedAccessorImpl(prop.getAccessor());
if(xducer.isDefault() && !context.fastBoot) {
TransducedAccessor xa = OptimizedTransducedAccessorFactory.get(prop);
if(xa!=null) return xa;
}
if(xducer.useNamespace())
return new CompositeContextDependentTransducedAccessorImpl( context, xducer, prop.getAccessor() );
else
return new CompositeTransducedAccessorImpl( context, xducer, prop.getAccessor() );
}