Java Code Examples for com.sun.xml.internal.bind.v2.runtime.Transducer

The following examples show how to use com.sun.xml.internal.bind.v2.runtime.Transducer. These examples are extracted from open source projects. 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
/**
 * Gets the {@link TransducedAccessor} appropriately configured for
 * the given property.
 *
 * <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(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
    }

    if(prop.id()==ID.IDREF)
        return new IDREFTransducedAccessorImpl(prop.getAccessor());

    if(xducer.isDefault() && context != null && !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() );
}
 
Example 2
/**
 * Gets the {@link TransducedAccessor} appropriately configured for
 * the given property.
 *
 * <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(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
    }

    if(prop.id()==ID.IDREF)
        return new IDREFTransducedAccessorImpl(prop.getAccessor());

    if(xducer.isDefault() && context != null && !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() );
}
 
Example 3
Source Project: openjdk-8   Source File: TransducedAccessor.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Gets the {@link TransducedAccessor} appropriately configured for
 * the given property.
 *
 * <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(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
    }

    if(prop.id()==ID.IDREF)
        return new IDREFTransducedAccessorImpl(prop.getAccessor());

    if(xducer.isDefault() && context != null && !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() );
}
 
Example 4
/**
 * Gets the {@link TransducedAccessor} appropriately configured for
 * the given property.
 *
 * <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(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
    }

    if(prop.id()==ID.IDREF)
        return new IDREFTransducedAccessorImpl(prop.getAccessor());

    if(xducer.isDefault() && context != null && !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() );
}
 
Example 5
public Transducer getTransducer() {
    if(!computedTransducer) {
        computedTransducer = true;
        xducer = calcTransducer();
    }
    return xducer;
}
 
Example 6
public Transducer getTransducer() {
    if(xducer==null) {
        xducer = RuntimeModelBuilder.createTransducer((RuntimeNonElementRef)this);
        if(xducer==null) {
            // this situation is checked by by the link method.
            // avoid repeating the same error by silently recovering
            xducer = RuntimeBuiltinLeafInfoImpl.STRING;
        }
    }
    return xducer;
}
 
Example 7
public Transducer getTransducer() {
    if(xducer==null) {
        xducer = RuntimeModelBuilder.createTransducer((RuntimeNonElementRef)this);
        if(xducer==null) {
            // this situation is checked by by the link method.
            // avoid repeating the same error by silently recovering
            xducer = RuntimeBuiltinLeafInfoImpl.STRING;
        }
    }
    return xducer;
}
 
Example 8
public Transducer getTransducer() {
    if(!computedTransducer) {
        computedTransducer = true;
        xducer = calcTransducer();
    }
    return xducer;
}
 
Example 9
Source Project: jdk8u60   Source File: RuntimeClassInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Transducer getTransducer() {
    if(!computedTransducer) {
        computedTransducer = true;
        xducer = calcTransducer();
    }
    return xducer;
}
 
Example 10
public Transducer getTransducer() {
    if(xducer==null) {
        xducer = RuntimeModelBuilder.createTransducer((RuntimeNonElementRef)this);
        if(xducer==null) {
            // this situation is checked by by the link method.
            // avoid repeating the same error by silently recovering
            xducer = RuntimeBuiltinLeafInfoImpl.STRING;
        }
    }
    return xducer;
}
 
Example 11
public Transducer getTransducer() {
    if(xducer==null) {
        xducer = RuntimeModelBuilder.createTransducer((RuntimeNonElementRef)this);
        if(xducer==null) {
            // this situation is checked by by the link method.
            // avoid repeating the same error by silently recovering
            xducer = RuntimeBuiltinLeafInfoImpl.STRING;
        }
    }
    return xducer;
}
 
Example 12
Source Project: hottub   Source File: RuntimeClassInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Transducer getTransducer() {
    if(!computedTransducer) {
        computedTransducer = true;
        xducer = calcTransducer();
    }
    return xducer;
}
 
Example 13
public Transducer getTransducer() {
    if(!computedTransducer) {
        computedTransducer = true;
        xducer = calcTransducer();
    }
    return xducer;
}
 
Example 14
public Transducer getTransducer() {
    if(!computedTransducer) {
        computedTransducer = true;
        xducer = calcTransducer();
    }
    return xducer;
}
 
Example 15
Source Project: hottub   Source File: TextLoader.java    License: GNU General Public License v2.0 4 votes vote down vote up
public TextLoader(Transducer xducer) {
    super(true);
    this.xducer = xducer;
}
 
Example 16
public Transducer<T> getTransducer() {
    return this;
}
 
Example 17
public Transducer getTransducer() {
    return RuntimeModelBuilder.createTransducer(this);
}
 
Example 18
public final Transducer getTransducer() {
    return this;
}
 
Example 19
public IDTransducerImpl(Transducer<ValueT> core) {
    super(core);
}
 
Example 20
public final Transducer getTransducer() {
    return this;
}
 
Example 21
Source Project: openjdk-8   Source File: RuntimeTypeRefImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public Transducer getTransducer() {
    return RuntimeModelBuilder.createTransducer(this);
}
 
Example 22
public CompositeContextDependentTransducedAccessorImpl(JAXBContextImpl context,Transducer<ValueT> xducer, Accessor<BeanT,ValueT> acc) {
    super(context,xducer,acc);
    assert xducer.useNamespace();
}
 
Example 23
public CompositeTransducedAccessorImpl(JAXBContextImpl context, Transducer<ValueT> xducer, Accessor<BeanT,ValueT> acc) {
    this.xducer = xducer;
    this.acc = acc.optimize(context);
}
 
Example 24
public final Transducer getTransducer() {
    return this;
}
 
Example 25
public Transducer<T> getTransducer() {
    return this;
}
 
Example 26
public Transducer getTransducer() {
    return RuntimeModelBuilder.createTransducer(this);
}
 
Example 27
Source Project: jdk8u60   Source File: RuntimeArrayInfoImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public <V> Transducer<V> getTransducer() {
    return null;
}
 
Example 28
public IDTransducerImpl(Transducer<ValueT> core) {
    super(core);
}
 
Example 29
Source Project: jdk8u60   Source File: RuntimeAnyTypeImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public <V> Transducer<V> getTransducer() {
    return null;
}
 
Example 30
public final Transducer getTransducer() {
    return this;
}