Package com.sun.codemodel

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


      // Get the factory class from the default package.
      final JDefinedClass factoryClass = packageoutline.objectFactory();
      if (factoryClass != null) {
        // LOG.info(XJCJavaForKmlApiPlugin.PLUGINNAME+" pkg:          " + pkg.name());
        LOG.info(XJCJavaForKmlApiPlugin.PLUGINNAME + " factoryClass: " + factoryClass.name());
        LOG.info(XJCJavaForKmlApiPlugin.PLUGINNAME + " factoryClass: " + factoryClass.fullName());
        LOG.info(XJCJavaForKmlApiPlugin.PLUGINNAME + " factoryClass: " + factoryClass.methods().size());
        factoryClass.methods().clear();
        LOG.info(XJCJavaForKmlApiPlugin.PLUGINNAME + " factoryClass: " + factoryClass.methods().size());
//        factoryClass.fields().clear();
        final JPackage parent = (JPackage)factoryClass.parentContainer();
View Full Code Here


      serializerCodeGenerator.getModel().build( configuration.getDestination(), statusPrinter );

      CodeGenerator<T> testCodeGenerator = new CodeGenerator<T>( decisionCallback );

      configuration.getLogOut().println( "Generating Serializer Tests:" );
      instantiateTestGenerator( testCodeGenerator ).generateSerializerTest( serializerClass.fullName(), descriptor );
      instantiateTestGenerator( testCodeGenerator ).generateSerializerVersionTest( serializerClass, descriptor );

      testCodeGenerator.getModel().build( configuration.getTestDestination(), statusPrinter );
    }
View Full Code Here

            // class collision.
            JDefinedClass cls = e.getExistingClass();
           
            // report the error
            errorReceiver.error( new SAXParseException(
                Messages.format( Messages.ERR_CLASSNAME_COLLISION, cls.fullName() ),
                (Locator)cls.metadata ));
            errorReceiver.error( new SAXParseException(
                Messages.format( Messages.ERR_CLASSNAME_COLLISION_SOURCE, name ),
                source ));
           
View Full Code Here

      for(Iterator<JDefinedClass> classIterator = p.classes(); classIterator.hasNext(); )
      {
        JDefinedClass clazz = classIterator.next();
        if (_classToDataSchemaLocationMap.containsKey(clazz) == false)
        {
          throw new IllegalStateException("Attempting to generate unregistered class: '" + clazz.fullName() + "'");
        }
      }
    }
  }
View Full Code Here

      {
        JDefinedClass definedClass = classIterator.next();
        boolean classFound;
        try
        {
          Class<?> clazz = classLoader.loadClass(definedClass.fullName());
          classFound = true;
        }
        catch (ClassNotFoundException e)
        {
          classFound = false;
View Full Code Here

        {
          classFound = false;
        }
        if (classFound)
        {
          _log.debug(definedClass.fullName() + " found in resolver path");
          definedClass.hide();
        }
        else if (hideClass(definedClass))
        {
          definedClass.hide();
View Full Code Here

        {
          definedClass.hide();
        }
        else if (definedClass.outer() == null)
        {
          File file = new File(targetDirectory, definedClass.fullName().replace('.', File.separatorChar) + ".java");
          generatedFiles.add(file);
        }
      }
    }
View Full Code Here

          }
          // If the candidate T is referred from list of parametrisations (e.g. List<T>), it cannot be removed.
          // However field substitutions will take place.
          else if (isListedAsParametrisation(c.getCandidateClass(), fieldType)) {
            logger.debug("Candidate " + c.getClassName() + " is listed as parametrisation of "
                        + targetClass.fullName() + "#" + fieldName + " and hence won't be removed.");
            c.unmarkForRemoval();
          }
        }

        JFieldVar originalImplField = targetClass.fields().get(fieldName);
View Full Code Here

          continue;
        }

        // We have a candidate field to be replaced with a wrapped version. Report finding to summary file.
        writeSummary("\tReplacing field [" + fieldType.name() + " " + targetClass.fullName() + "#" + fieldName
                    + "]");
        candidate.incrementSubstitutions();
        modificationCount++;

        // The container class has to be deleted. Check that inner class has to be moved to it's parent.
View Full Code Here

        setterMethod.body().assign(JExpr._this().ref(fieldName),
                    setterMethod.param(collectionInterfaceClass, fieldName));

        // Modify interface as well:
        if (implementationInterface != null) {
          writeSummary("\tCorrecting interface " + implementationInterface.fullName());

          implementationInterface.method(JMod.PUBLIC, collectionInterfaceClass, "get" + propertyName);
          setterMethod = implementationInterface.method(JMod.PUBLIC, codeModel.VOID, "set" + propertyName);
          setterMethod.param(collectionInterfaceClass, fieldName);
        }
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.