Examples of TypeReference


Examples of com.fasterxml.jackson.core.type.TypeReference

    if (useCache) {
      final Function cacheFn = strategy.pullFromCache();
      final byte[] cachedResult = cache.get(key);
      if (cachedResult != null) {
        final TypeReference cacheObjectClazz = strategy.getCacheObjectClazz();

        return Sequences.map(
            new BaseSequence<>(
                new BaseSequence.IteratorMaker<T, Iterator<T>>()
                {
View Full Code Here

Examples of com.strobel.assembler.metadata.TypeReference

                //
                // T t; t = (T)(t + n) => t += n
                //

                final CastExpression castExpression = (CastExpression) right;
                final TypeReference castType = castExpression.getType().toTypeReference();
                final Expression castedValue = castExpression.getExpression();

                if (castType != null &&
                    castType.isPrimitive() &&
                    castedValue instanceof BinaryOperatorExpression) {

                    final ResolveResult leftResult = _resolver.apply(left);

                    if (leftResult != null &&
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

        WSDLParameter response = new WSDLParameter();
        // process return
        Class returnType = method.getReturnType();
        if (returnType != null && !"void".equals(returnType.getName())) {
            QName resQN = new QName(resultTNS, resultName);
            TypeReference typeRef = new TypeReference(resQN, returnType, new Annotation[0]);
            response.setName(method.getName() + "Response");
            response.setStyle(JavaType.Style.OUT);
            response.setTargetNamespace(resultTNS);
            JavaParameter jp = new JavaParameter(resultName, typeRef, JavaType.Style.OUT);
            jp.setPartName(resultPartName);
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

                    partName = webParam.partName().length() > 0 ? webParam.partName() : paraName;
                    paraTNS = webParam.targetNamespace().length() > 0
                        ? webParam.targetNamespace() : paraTNS;

                    QName requestQN = new QName(paraTNS, paraName);
                    TypeReference typeref = new TypeReference(requestQN, clazz, paraAnns[i]);
                    JavaParameter jp;
                    if (holder) {
                        if (webParam.mode() == WebParam.Mode.INOUT) {
                            jp = new JavaParameter(typeref.tagName.getLocalPart(), typeref,
                                                   JavaType.Style.INOUT);
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

                }
                exName = wf.name();
            }

            QName exQName = new QName(exNameSpace, exName);
            TypeReference tf = new TypeReference(exQName, exReturnType, anns);
            WSDLException wsdlEx = new WSDLException(exClass, tf);

            jmethod.addWSDLException(wsdlEx);

        }
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

            Message msg = new Message("LOAD_CLASS_ERROR", LOG, reqClassName);
            throw new ToolException(msg, e);
        }
        QName reqQN = new QName(reqNS, reqName);
        TypeReference typeRef = new TypeReference(reqQN, reqClass, new Annotation[0]);
        WSDLParameter request = new WSDLParameter(reqName, typeRef, JavaType.Style.IN);
        request.setTargetNamespace(reqNS);
        javaMethod.addRequest(request);

        WSDLParameter response = null;
        if (!isOneWayMethod(method)) {
            // process response
            ResponseWrapper resWrapper = method.getAnnotation(ResponseWrapper.class);
            String resClassName = "";
            // rule 3.5 suffix -"Response"
            String resName = method.getName() + "Response";
            String resNS = model.getTargetNameSpace();
            if (resWrapper != null) {
                resClassName = resWrapper.className();
                resName = resWrapper.localName().length() > 0 ? resWrapper.localName() : resName;
                resNS = resWrapper.targetNamespace().length() > 0 ? resWrapper.targetNamespace() : resNS;
            } else {
                resClassName = model.getPackageName() + ".types."
                    + AnnotationUtil.capitalize(method.getName())
                               + "Response";
            }
            Class resClass = null;
            QName resQN = new QName(resNS, resName);
            try {
                resClass = AnnotationUtil
                    .loadClass(resClassName, method.getDeclaringClass().getClassLoader());
            } catch (Exception e) {
                Message msg = new Message("LOAD_CLASS_ERROR", LOG, resClassName);
                throw new ToolException(msg, e);
            }
            typeRef = new TypeReference(resQN, resClass, new Annotation[0]);
            response = new WSDLParameter(resName, typeRef, JavaType.Style.OUT);
            response.setTargetNamespace(resNS);
            javaMethod.addResponse(response);
            WebResult webResult = method.getAnnotation(WebResult.class);
            JavaParameter returnParameter = getReturnParameter(webResult, method);
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

                    partName = webParam.partName().length() > 0 ? webParam.partName() : paraName;
                    paraTNS = webParam.targetNamespace().length() > 0
                        ? webParam.targetNamespace() : paraTNS;

                    QName requestQN = new QName(paraTNS, paraName);
                    TypeReference typeref = new TypeReference(requestQN, clazz, paraAnns[i]);
                    JavaParameter jp;
                    if (holder) {
                        if (webParam.mode() == WebParam.Mode.INOUT) {
                            jp = new JavaParameter(typeref.tagName.getLocalPart(), typeref,
                                                   JavaType.Style.INOUT);
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

                }
                exName = wf.name();
            }

            QName exQName = new QName(exNameSpace, exName);
            TypeReference tf = new TypeReference(exQName, exReturnType, anns);
            WSDLException wsdlEx = new WSDLException(exClass, tf);

            jmethod.addWSDLException(wsdlEx);

        }
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

        if (resultQName != null && !isOneWayMethod(method) && (returnType != null)
            && (!"void".equals(returnType.getName()))) {
            // Annotation[] annotations = method.getAnnotations();
            Annotation[] annotations = new Annotation[0];
            if (resultQName.getLocalPart() != null) {
                TypeReference rTypeReference = new TypeReference(resultQName, returnType, annotations);
                jpara = new JavaParameter();
                jpara.setName(method.getName() + "Response");
                jpara.setTypeReference(rTypeReference);
                jpara.setStyle(JavaType.Style.OUT);
                jpara.setHeader(isHeader);
View Full Code Here

Examples of com.sun.xml.bind.api.TypeReference

        javaMethod.addRequest(request);

        boolean isOneway = method.isAnnotationPresent(Oneway.class);
        if (!isOneway) {
            QName resQN = new QName(targetNS, method.getName() + "Response");
            TypeReference typeRef = new TypeReference(resQN, this.getClass(), new Annotation[0]);
            WSDLParameter response = new WSDLParameter();
            response.setName(method.getName() + "Response");
            response.setStyle(JavaType.Style.OUT);
            javaMethod.addResponse(response);

            Class returnType = method.getReturnType();
            String resultName = method.getName() + "Response";
            String resultTNS = targetNS;
            String resultPartName = null;
            WebResult webResult = method.getAnnotation(WebResult.class);
            boolean webResultHeader = false;
            if (webResult != null) {
                resultName = webResult.name().length() > 0 ? webResult.name() : resultName;
                resultPartName = webResult.partName().length() > 0 ? webResult.partName() : resultName;
                resultTNS = webResult.targetNamespace().length() > 0
                    ? webResult.targetNamespace() : resultTNS;
                webResultHeader = webResult.header();
            }
            QName resultQName = new QName(resultTNS, resultName);
            if (returnType != null && (!"void".equals(returnType.getName()))) {
                // Annotation[] rann = method.getAnnotations();
                Annotation[] rann = new Annotation[0];
                typeRef = new TypeReference(resultQName, returnType, rann);
                JavaParameter returnParameter = new JavaParameter(resultName, typeRef, JavaType.Style.OUT);
                returnParameter.setPartName(resultPartName);
                returnParameter.setTargetNamespace(resultTNS);
                returnParameter.setHeader(webResultHeader);
                response.addChildren(returnParameter);
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.