Package com.sun.codemodel

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


  @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


  public JDefinedClass generateSerializerVersionTest( @NotNull String serializerClassName, @NotNull DomainObjectDescriptor domainObjectDescriptor ) throws JClassAlreadyExistsException {
    JClass domainType = codeGenerator.ref( domainObjectDescriptor.getQualifiedName() );
    JClass serializerClass = codeGenerator.ref( serializerClassName );

    //the class
    JDefinedClass testClass = codeModel._class( createSerializerVersionTestName( serializerClass.fullName() ) )._extends( createVersionExtendsClass( domainType, serializerClass ) );

    //getSerializer
    createGetSerializerMethod( testClass, serializerClass, domainType );
    createVersionVerifyMethod( testClass, serializerClass, domainObjectDescriptor );
    createVersionsDataPoint( testClass, serializerClass, domainType, domainObjectDescriptor );
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

  @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

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.