Package com.sun.codemodel

Examples of com.sun.codemodel.JAnnotationUse.param()


      JClass fieldType = getJaxbModelType( fieldInfo.getType(), isCollectionType || type == Scope.STUB );
      JFieldVar field = addField( currentClass, fieldType, fieldInfo );

      if ( isCollectionType ) {
        JAnnotationUse annotation = field.annotate( XmlElement.class );
        annotation.param( "name", NamingSupport.createSingular( field.name() ) );
      }

      addGetter( currentClass, fieldType, field, fieldInfo.getSimpleName() );
      addSetter( currentClass, fieldType, field, fieldInfo.getSimpleName() );
    }
View Full Code Here


  protected abstract Config getConfig();

  protected void annotate(JDefinedClass cls, String classType, String location)
  {
    JAnnotationUse generatedAnnotation = cls.annotate(Generated.class);
    generatedAnnotation.param("value", getClass().getName());
    String comments = "LinkedIn " + classType;

    if (location != null)
    {
      comments += ". Generated from " + location + '.';
View Full Code Here

    if (location != null)
    {
      comments += ". Generated from " + location + '.';
    }

    generatedAnnotation.param("comments", comments);
    generatedAnnotation.param("date", new Date().toString());
  }

  protected static String capitalize(String name)
  {
View Full Code Here

    {
      comments += ". Generated from " + location + '.';
    }

    generatedAnnotation.param("comments", comments);
    generatedAnnotation.param("date", new Date().toString());
  }

  protected static String capitalize(String name)
  {
    return Character.toUpperCase(name.charAt(0)) + name.substring(1);
View Full Code Here

    {
        super.annotate(context, service, jc, binding);
       
        JAnnotationUse ann = jc.annotate(WebService.class);
       
        ann.param("serviceName", service.getSimpleName());
        ann.param("targetNamespace", service.getTargetNamespace());
       
        JClass intf = (JClass) service.getProperty(ServiceInterfaceGenerator.SERVICE_INTERFACE);
        ann.param("endpointInterface", intf.fullName());
       
View Full Code Here

        super.annotate(context, service, jc, binding);
       
        JAnnotationUse ann = jc.annotate(WebService.class);
       
        ann.param("serviceName", service.getSimpleName());
        ann.param("targetNamespace", service.getTargetNamespace());
       
        JClass intf = (JClass) service.getProperty(ServiceInterfaceGenerator.SERVICE_INTERFACE);
        ann.param("endpointInterface", intf.fullName());
       
        jc._implements(intf);
View Full Code Here

       
        ann.param("serviceName", service.getSimpleName());
        ann.param("targetNamespace", service.getTargetNamespace());
       
        JClass intf = (JClass) service.getProperty(ServiceInterfaceGenerator.SERVICE_INTERFACE);
        ann.param("endpointInterface", intf.fullName());
       
        jc._implements(intf);

        service.setProperty(SERVICE_STUB, jc);
    }
View Full Code Here

    protected void annotate(GenerationContext context, Service service, JDefinedClass jc, Binding binding)
    {
        JAnnotationUse ann = jc.annotate(WebService.class);
       
        ann.param("name", service.getServiceInfo().getPortType().getLocalPart());
        ann.param("targetNamespace", service.getServiceInfo().getPortType().getNamespaceURI());
       
        service.setProperty(SERVICE_INTERFACE, jc);
       
        AbstractSoapBinding soapBinding = (AbstractSoapBinding) binding;
View Full Code Here

    protected void annotate(GenerationContext context, Service service, JDefinedClass jc, Binding binding)
    {
        JAnnotationUse ann = jc.annotate(WebService.class);
       
        ann.param("name", service.getServiceInfo().getPortType().getLocalPart());
        ann.param("targetNamespace", service.getServiceInfo().getPortType().getNamespaceURI());
       
        service.setProperty(SERVICE_INTERFACE, jc);
       
        AbstractSoapBinding soapBinding = (AbstractSoapBinding) binding;
        ann = jc.annotate(SOAPBinding.class);
View Full Code Here

       
        AbstractSoapBinding soapBinding = (AbstractSoapBinding) binding;
        ann = jc.annotate(SOAPBinding.class);
        if (soapBinding.getStyle().equals(SoapConstants.STYLE_DOCUMENT))
        {
            ann.param("style", Style.DOCUMENT);
        }
        else if (soapBinding.getStyle().equals(SoapConstants.STYLE_RPC))
        {
            ann.param("style", Style.RPC);
        }
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.