Package com.sun.codemodel

Examples of com.sun.codemodel.JClass.fullName()


  @Nonnull
  public JDefinedClass generateSerializer( @Nonnull DomainObjectDescriptor domainObjectDescriptor ) throws JClassAlreadyExistsException {
    JClass domainType = codeGenerator.ref( domainObjectDescriptor.getQualifiedName() );

    //the class
    JDefinedClass serializerClass = codeModel._class( createSerializerClassName( domainType.fullName() ) )._extends( createSerializerExtendsExpression( domainType ) );

    //the constructor
    JMethod constructor = createConstructor( serializerClass, domainObjectDescriptor );

    JMethod serializeMethod = createSerializeMethodStub( domainType, serializerClass );
View Full Code Here


  @NotNull
  public JDefinedClass generateSerializer( @NotNull DomainObjectDescriptor domainObjectDescriptor ) throws JClassAlreadyExistsException {
    JClass domainType = codeGenerator.ref( domainObjectDescriptor.getQualifiedName() );

    //the class
    JDefinedClass serializerClass = codeModel._class( createSerializerClassName( domainType.fullName() ) )._extends( createSerializerExtendsExpression( domainType ) );

    //the constructor
    JMethod constructor = createConstructor( serializerClass, domainObjectDescriptor );

    JMethod serializeMethod = createSerializeMethodStub( domainType, serializerClass );
View Full Code Here

  @NotNull
  public JDefinedClass generateSerializer( @NotNull DomainObjectDescriptor domainObjectDescriptor ) throws JClassAlreadyExistsException {
    JClass domainType = codeGenerator.ref( domainObjectDescriptor.getQualifiedName() );

    //the class
    JDefinedClass serializerClass = codeModel._class( createSerializerClassName( domainType.fullName() ) )._extends( createSerializerExtendsExpression( domainType ) );

    //the constructor
    JMethod constructor = createConstructor( serializerClass, domainObjectDescriptor );

    JMethod serializeMethod = createSerializeMethodStub( domainType, serializerClass );
View Full Code Here

        // and then put jaxb.properties to point to it
        JPropertyFile jaxbProperties = new JPropertyFile("jaxb.properties");
        targetPackage.addResourceFile(jaxbProperties);
        jaxbProperties.add(
            JAXBContext.JAXB_CONTEXT_FACTORY,
            factory.fullName());
    }

    void populate(CElementInfo ei) {
        populate(ei,Aspect.IMPLEMENTATION,Aspect.IMPLEMENTATION);
    }
View Full Code Here

    {
      JClass fieldsRefType = _pathSpecClass;
      if (hasNestedFields(unionMemberType))
      {
        JClass unionMemberClass = processSchema(unionMemberType, unionClass, unionMemberType.getUnionMemberKey());
        fieldsRefType = getCodeModel().ref(unionMemberClass.fullName() + ".Fields");
      }
      JMethod accessorMethod = fieldsNestedClass.method(JMod.PUBLIC, fieldsRefType, memberName(unionMemberType));
      accessorMethod.body()._return(JExpr._new(fieldsRefType).arg(JExpr.invoke("getPathComponents")).arg(unionMemberType.getUnionMemberKey()));
    }
  }
View Full Code Here

    {
      JClass fieldsRefType = _pathSpecClass;
      if (hasNestedFields(field.getType()))
      {
        JClass fieldType = processSchema(field.getType(), templateClass, field.getName());
        fieldsRefType = getCodeModel().ref(fieldType.fullName() + ".Fields");
      }

      JMethod constantField = fieldsNestedClass.method(JMod.PUBLIC, fieldsRefType, escapeReserved(field.getName()));
      constantField.body()._return(JExpr._new(fieldsRefType).arg(JExpr.invoke("getPathComponents")).arg(
              field.getName()));
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

       
        JClass serviceImpl = (JClass) service.getProperty(ServiceStubGenerator.SERVICE_STUB);
        if (serviceImpl == null) return;
       
        Element serviceClassEl = new Element("serviceClass", xfireNs);
        serviceClassEl.addContent(serviceImpl.fullName());
        serviceEl.addContent(serviceClassEl);
       
        Element wsdlEl = new Element("wsdlURL", xfireNs);
        wsdlEl.addContent(context.getWsdlLocation());
        serviceEl.addContent(wsdlEl);
View Full Code Here

        create.body().add(propsVar.invoke("put").arg("annotations.allow.interface").arg(JExpr.TRUE));
       
        JVar asfVar = create.body().decl(asfType, "asf", asfCons);
        JInvocation createInvoke = asfVar.invoke("create");
       
        createInvoke.arg(JExpr.direct(serviceIntf.fullName() + ".class"));
        createInvoke.arg(propsVar);
       
        JInvocation bindingCreation = asfVar.invoke("setBindingCreationEnabled");
        bindingCreation.arg(JExpr.lit(false));
        create.body().add(bindingCreation);
View Full Code Here

    Iterator<JClass> implementedIterator = ( ( JClass ) erasure )._implements();
    while ( implementedIterator.hasNext() ) {
      JClass implemented = implementedIterator.next();

      if ( implemented.fullName().equals( daClass.getName() ) ) {
        return true;
      }
    }

    return false;
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.