Examples of NativeType


Examples of jnr.ffi.NativeType

        jnr.ffi.mapper.ToNativeType mappedToNativeType = typeMapper.getToNativeType(signatureType, context);
        ToNativeConverter toNativeConverter = mappedToNativeType != null ? mappedToNativeType.getToNativeConverter() : null;


        Class boxedType = toNativeConverter != null ? toNativeConverter.nativeType() : javaType;
        NativeType nativeType = Types.getType(runtime, boxedType, annotations).getNativeType();
        jnr.ffi.provider.ToNativeType toNativeType = new jnr.ffi.provider.ToNativeType(javaType, nativeType, annotations, toNativeConverter, null);
        jnr.ffi.provider.FromNativeType fromNativeType = new jnr.ffi.provider.FromNativeType(javaType, nativeType, annotations, fromNativeConverter, null);
        Variable variable;
        Pointer memory = MemoryUtil.newPointer(runtime, symbolAddress);
        variable = getNativeVariableAccessor(memory, toNativeType, fromNativeType);
View Full Code Here

Examples of jnr.ffi.NativeType

    static ResultType getResultType(jnr.ffi.Runtime runtime, Class type, Collection<Annotation> annotations,
                                    FromNativeConverter fromNativeConverter, FromNativeContext fromNativeContext) {
        Collection<Annotation> converterAnnotations = ConverterMetaData.getAnnotations(fromNativeConverter);
        Collection<Annotation> allAnnotations = Annotations.mergeAnnotations(annotations, converterAnnotations);
        NativeType nativeType = getMethodResultNativeType(runtime,
                fromNativeConverter != null ? fromNativeConverter.nativeType() : type, allAnnotations);
        boolean useContext = fromNativeConverter != null && !hasAnnotation(converterAnnotations, FromNativeConverter.NoContext.class);
        return new ResultType(type, nativeType, allAnnotations, fromNativeConverter, useContext ? fromNativeContext : null);
    }
View Full Code Here

Examples of jnr.ffi.NativeType

    static ResultType getResultType(jnr.ffi.Runtime runtime, Class type, Collection<Annotation> annotations,
                                    jnr.ffi.mapper.FromNativeType fromNativeType, FromNativeContext fromNativeContext) {
        Collection<Annotation> converterAnnotations = getAnnotations(fromNativeType);
        Collection<Annotation> allAnnotations = Annotations.mergeAnnotations(annotations, converterAnnotations);
        FromNativeConverter fromNativeConverter = fromNativeType != null ? fromNativeType.getFromNativeConverter() : null;
        NativeType nativeType = getMethodResultNativeType(runtime,
                fromNativeConverter != null ? fromNativeConverter.nativeType() : type, allAnnotations);
        boolean useContext = fromNativeConverter != null && !hasAnnotation(converterAnnotations, FromNativeConverter.NoContext.class);
        return new ResultType(type, nativeType, allAnnotations, fromNativeConverter, useContext ? fromNativeContext : null);
    }
View Full Code Here

Examples of jnr.ffi.NativeType

        return new ResultType(type, nativeType, allAnnotations, fromNativeConverter, useContext ? fromNativeContext : null);
    }

    private static ParameterType getParameterType(jnr.ffi.Runtime runtime, Class type, Collection<Annotation> annotations,
                                          ToNativeConverter toNativeConverter, ToNativeContext toNativeContext) {
        NativeType nativeType = getMethodParameterNativeType(runtime,
                toNativeConverter != null ? toNativeConverter.nativeType() : type, annotations);
        return new ParameterType(type, nativeType, annotations, toNativeConverter, toNativeContext);
    }
View Full Code Here

Examples of jnr.ffi.NativeType

    }

    private static ParameterType getParameterType(jnr.ffi.Runtime runtime, Class type, Collection<Annotation> annotations,
                                                  jnr.ffi.mapper.ToNativeType toNativeType, ToNativeContext toNativeContext) {
        ToNativeConverter toNativeConverter = toNativeType != null ? toNativeType.getToNativeConverter() : null;
        NativeType nativeType = getMethodParameterNativeType(runtime,
                toNativeConverter != null ? toNativeConverter.nativeType() : type, annotations);
        return new ParameterType(type, nativeType, annotations, toNativeConverter, toNativeContext);
    }
View Full Code Here

Examples of net.opengis.wfs.NativeType

     */
    protected static final QName[] EMPTY_QNAMES = new QName[0];

    public void checkValidity(EObject element, Map featureTypeInfos)
        throws WFSTransactionException {
        NativeType nativ = (NativeType) element;

        if (!nativ.isSafeToIgnore()) {
            throw new WFSTransactionException("Native element:" + nativ.getVendorId()
                + " unsupported but marked as" + " unsafe to ignore", "InvalidParameterValue");
        }
    }
View Full Code Here

Examples of net.opengis.wfs.NativeType

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        NativeType nativ = wfsfactory.createNativeType();

        //&lt;xsd:attribute name="vendorId" type="xsd:string" use="required"&gt;
        nativ.setVendorId((String) node.getAttributeValue("vendorId"));

        //&lt;xsd:attribute name="safeToIgnore" type="xsd:boolean" use="required"&gt;
        nativ.setSafeToIgnore(((Boolean) node.getAttributeValue("safeToIgnore")).booleanValue());

        return nativ;
    }
View Full Code Here

Examples of net.opengis.wfs.NativeType

     */
    protected static final QName[] EMPTY_QNAMES = new QName[0];

    public void checkValidity(EObject element, Map featureTypeInfos)
        throws WFSTransactionException {
        NativeType nativ = (NativeType) element;

        if (!nativ.isSafeToIgnore()) {
            throw new WFSTransactionException("Native element:" + nativ.getVendorId()
                + " unsupported but marked as" + " unsafe to ignore", "InvalidParameterValue");
        }
    }
View Full Code Here

Examples of net.opengis.wfs.NativeType

        public WFS11(EObject adaptee) {
            super(adaptee);
        }

        public static NativeType unadapt(Native nativ) {
            NativeType n = WfsFactory.eINSTANCE.createNativeType();
            n.setSafeToIgnore(nativ.isSafeToIgnore());
            n.setVendorId(nativ.getVendorId());
            //TODO: value
            return n;
        }
View Full Code Here

Examples of net.opengis.wfs.NativeType

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        NativeType nativ = wfsfactory.createNativeType();

        //&lt;xsd:attribute name="vendorId" type="xsd:string" use="required"&gt;
        nativ.setVendorId((String) node.getAttributeValue("vendorId"));

        //&lt;xsd:attribute name="safeToIgnore" type="xsd:boolean" use="required"&gt;
        nativ.setSafeToIgnore(((Boolean) node.getAttributeValue("safeToIgnore")).booleanValue());
       
        //&lt;xsd:any processContents="lax" namespace="##other" minOccurs="0"/>
        if (instance.getText() != null && instance.getText().length() != 0) {
            nativ.setValue(instance.getText());
        }
        return nativ;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.