Examples of JavaAnnotation


Examples of com.google.gxp.compiler.base.JavaAnnotation

      // Check for java:annotate attribute
      AttributeMap attrMap = nodeParts.getAttributes();
      Attribute annotateAttr = attrMap.getAttribute(JavaNamespace.INSTANCE, "annotate");
      if (annotateAttr != null) {
        String annotateStr = annotateAttr.getValue().getStaticString(alertSink, "");
        result.add(new JavaAnnotation(annotateAttr, defaultElement, annotateStr));
      }

      return result;
    }
View Full Code Here

Examples of com.google.gxp.compiler.base.JavaAnnotation

          with = null;
        }
      }

      if (with != null) {
        output.accumulate(new JavaAnnotation(node.getSourcePosition(),
                                             node.getDisplayName(),
                                             element,
                                             with));
      }
      return null;
View Full Code Here

Examples of com.google.gxp.compiler.base.JavaAnnotation

      // Check for java:annotate attribute
      AttributeMap attrMap = nodeParts.getAttributes();
      Attribute annotateAttr = attrMap.getAttribute(JavaNamespace.INSTANCE, "annotate");
      if (annotateAttr != null) {
        String annotateStr = annotateAttr.getValue().getStaticString(alertSink, "");
        result.add(new JavaAnnotation(annotateAttr, defaultElement, annotateStr));
      }

      return result;
    }
View Full Code Here

Examples of com.google.gxp.compiler.base.JavaAnnotation

          with = null;
        }
      }

      if (with != null) {
        output.accumulate(new JavaAnnotation(node.getSourcePosition(),
                                             node.getDisplayName(),
                                             element,
                                             with));
      }
      return null;
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaAnnotation

            method = (JavaMethod) ja;
        } else {
            throw new RuntimeException("RequestWrapper and ResponseWrapper can only annotate JavaMethod");
        }
        if (wrapperRequest != null) {
            JavaAnnotation wrapperRequestAnnotation = new JavaAnnotation("RequestWrapper");
            wrapperRequestAnnotation.addArgument("localName", wrapperRequest.getType());
            wrapperRequestAnnotation.addArgument("targetNamespace", wrapperRequest.getTargetNamespace());
            wrapperRequestAnnotation.addArgument("className", wrapperRequest.getClassName());
            method.addAnnotation("RequestWrapper", wrapperRequestAnnotation);
            method.getInterface().addImport("javax.xml.ws.RequestWrapper");
        }
        if (wrapperResponse != null) {
            JavaAnnotation wrapperResponseAnnotation = new JavaAnnotation("ResponseWrapper");
            wrapperResponseAnnotation.addArgument("localName", wrapperResponse.getType());
            wrapperResponseAnnotation.addArgument("targetNamespace", wrapperResponse.getTargetNamespace());
            wrapperResponseAnnotation.addArgument("className", wrapperResponse.getClassName());
            method.addAnnotation("ResponseWrapper", wrapperResponseAnnotation);
            method.getInterface().addImport("javax.xml.ws.ResponseWrapper");
        }
    }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaAnnotation

        } else {
            throw new RuntimeException("WebResult can only annotate JavaMethod");
        }
           
        if (method.isOneWay()) {
            JavaAnnotation oneWayAnnotation = new JavaAnnotation("Oneway");
            method.addAnnotation("Oneway", oneWayAnnotation);
            method.getInterface().addImport("javax.jws.Oneway");
            return;
        }

        if ("void".equals(method.getReturn().getType())) {
            return;
        }
        JavaAnnotation resultAnnotation = new JavaAnnotation("WebResult");
        String targetNamespace = method.getReturn().getTargetNamespace();
        String name = "return";

        if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT && !method.isWrapperStyle()) {
            name = method.getName() + "Response";
        }

        if (method.getSoapStyle() == SOAPBinding.Style.RPC) {
            name = method.getReturn().getName();
            targetNamespace = method.getInterface().getNamespace();
          
        }
        if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT) {
            if (method.getReturn().getQName() != null) {
                name = method.getReturn().getQName().getLocalPart();
            }
            targetNamespace = method.getReturn().getTargetNamespace();
        }

        resultAnnotation.addArgument("name", name);
        resultAnnotation.addArgument("targetNamespace", targetNamespace);

        if (method.getSoapStyle() == SOAPBinding.Style.RPC
            || (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT && !method.isWrapperStyle())) {
            resultAnnotation.addArgument("partName", method.getReturn().getName());
        }

        method.addAnnotation("WebResult", resultAnnotation);
        method.getInterface().addImport("javax.jws.WebResult");
    }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaAnnotation

        } else {
            throw new RuntimeException("BindingAnnotator can only annotate JavaInterface");
        }
       
        if (processBinding(intf)) {
            JavaAnnotation bindingAnnotation = new JavaAnnotation("SOAPBinding");
            if (!SOAPBinding.Style.DOCUMENT.equals(intf.getSOAPStyle())) {
                String style = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPStyle().toString());
                bindingAnnotation.addArgument("style", style, "");               
            }
            if (!SOAPBinding.Use.LITERAL.equals(intf.getSOAPUse())) {
                String use = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPUse().toString());
                bindingAnnotation.addArgument("use", use, "");
            }           
            if (intf.getSOAPStyle() == SOAPBinding.Style.DOCUMENT) {
                String parameterStyle = SOAPBindingUtil.getBindingAnnotation(intf.
                                                                             getSOAPParameterStyle().
                                                                             toString());
                bindingAnnotation.addArgument("parameterStyle", parameterStyle, "");
            }
            intf.addAnnotation(bindingAnnotation.toString());
        }
    }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaAnnotation

            method = (JavaMethod) ja;
        } else {
            throw new RuntimeException("WebMethod can only annotate JavaMethod");
        }
        String operationName = method.getOperationName();
        JavaAnnotation methodAnnotation = new JavaAnnotation("WebMethod");
       
        if (!method.getName().equals(operationName)) {
            methodAnnotation.addArgument("operationName", operationName);
        }
        if (!StringUtils.isEmpty(method.getSoapAction())) {
            methodAnnotation.addArgument("action", method.getSoapAction());
        }
        method.addAnnotation("WebMethod", methodAnnotation);
        method.getInterface().addImport("javax.jws.WebMethod");
    }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaAnnotation

        }

        JavaParameter asyncHandler = new JavaParameter();
        asyncHandler.setName("asyncHandler");
        asyncHandler.setClassName(getAsyncClassName(method, "AsyncHandler"));
        JavaAnnotation asyncHandlerAnnotation = new JavaAnnotation("WebParam");
        asyncHandlerAnnotation.addArgument("name", "asyncHandler");
        asyncHandlerAnnotation.addArgument("targetNamespace", "");
        asyncHandler.setAnnotation(asyncHandlerAnnotation);

        pollingMethod.addParameter(asyncHandler);

        method.getInterface().addMethod(pollingMethod);
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaAnnotation

        if (ja instanceof JavaInterface) {
            intf = (JavaInterface) ja;
        } else {
            throw new RuntimeException("WebService can only annotate JavaInterface");
        }
        JavaAnnotation serviceAnnotation = new JavaAnnotation("WebService");
        serviceAnnotation.addArgument("targetNamespace", intf.getNamespace());
        //serviceAnnotation.addArgument("wsdlLocation", intf.getLocation());
        serviceAnnotation.addArgument("name", intf.getWebServiceName());
       
        intf.addAnnotation(serviceAnnotation.toString());
    }
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.