Package com.sun.tools.xjc.util

Examples of com.sun.tools.xjc.util.CodeModelClassFactory.createClass()


    saxParserFactoryClass = codeModel._ref(SAXParserFactory.class);
    parserConfigurationExceptionClass = codeModel._ref(ParserConfigurationException.class);
   
    final CodeModelClassFactory classFactory = outline.getClassFactory();
    final JPackage kmlpackage = Util.getKmlClassPackage(outline);
    namespaceFilterHandler = classFactory.createClass(kmlpackage, JMod.FINAL, "NamespaceFilterHandler", null, ClassType.CLASS);
    namespaceFilterHandler._implements(contentHandlerClass.boxify());
    final JFieldVar KML_20 = namespaceFilterHandler.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, stringClass, "KML_20", JExpr.lit("http://earth.google.com/kml/2.0"));
    final JFieldVar KML_21 = namespaceFilterHandler.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, stringClass, "KML_21", JExpr.lit("http://earth.google.com/kml/2.1"));
    final JFieldVar KML_22 = namespaceFilterHandler.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, stringClass, "KML_22", JExpr.lit("http://www.opengis.net/kml/2.2"));
    final JFieldVar content = namespaceFilterHandler.field(JMod.PRIVATE, contentHandlerClass, "contentHandler");
View Full Code Here


    final JVar startPrefixMappingPrefix = startPrefixMapping.param(stringClass, "prefix");
    final JVar startPrefixMappingUri = startPrefixMapping.param(stringClass, "uri");
    startPrefixMapping._throws(saxExceptionClass.boxify());
    startPrefixMapping.body().add(content.invoke("startPrefixMapping").arg(startPrefixMappingPrefix).arg(startPrefixMappingUri));
 
    namespaceFilterXMLReaderclass = classFactory.createClass(kmlpackage, JMod.FINAL, "NamespaceFilterXMLReader", null, ClassType.CLASS);
    namespaceFilterXMLReaderclass._implements(xmlReaderClass.boxify());
    final JFieldVar xmlReader = namespaceFilterXMLReaderclass.field(JMod.PRIVATE, xmlReaderClass, "xmlReader");
    final JMethod namespaceFilterXMLReaderclassConstrutor = namespaceFilterXMLReaderclass.constructor(JMod.PUBLIC);
    final JVar paramValidate = namespaceFilterXMLReaderclassConstrutor.param(cc.implClass.owner().BOOLEAN, "validate");
    namespaceFilterXMLReaderclassConstrutor._throws(saxExceptionClass.boxify())._throws(parserConfigurationExceptionClass.boxify());
View Full Code Here

  public ClazzPool(final Outline outline) {
    final JPackage kmlpackage = Util.getKmlClassPackage(outline);
    final CodeModelClassFactory classFactory = outline.getClassFactory();
    final JPackage ppp = outline.getCodeModel()._package(kmlpackage.getPackage().name() + ".annotations");
    classObviousAnnotation = classFactory.createClass(ppp, JMod.PUBLIC, "Obvious", null, ClassType.ANNOTATION_TYPE_DECL);
    classObviousAnnotation.annotate(Target.class).param("value", ElementType.FIELD).param("value", ElementType.METHOD);
    classCoordinateConverter = classFactory.createClass(kmlpackage, JMod.PUBLIC | JMod.FINAL, "CoordinatesConverter", null, ClassType.CLASS);
    classBooleanConverter = classFactory.createClass(kmlpackage, JMod.PUBLIC | JMod.FINAL, "BooleanConverter", null, ClassType.CLASS);
   
    for (final ClassOutline classOutline : outline.getClasses()) {
View Full Code Here

    final JPackage kmlpackage = Util.getKmlClassPackage(outline);
    final CodeModelClassFactory classFactory = outline.getClassFactory();
    final JPackage ppp = outline.getCodeModel()._package(kmlpackage.getPackage().name() + ".annotations");
    classObviousAnnotation = classFactory.createClass(ppp, JMod.PUBLIC, "Obvious", null, ClassType.ANNOTATION_TYPE_DECL);
    classObviousAnnotation.annotate(Target.class).param("value", ElementType.FIELD).param("value", ElementType.METHOD);
    classCoordinateConverter = classFactory.createClass(kmlpackage, JMod.PUBLIC | JMod.FINAL, "CoordinatesConverter", null, ClassType.CLASS);
    classBooleanConverter = classFactory.createClass(kmlpackage, JMod.PUBLIC | JMod.FINAL, "BooleanConverter", null, ClassType.CLASS);
   
    for (final ClassOutline classOutline : outline.getClasses()) {
      final ClassOutlineImpl cc = (ClassOutlineImpl) classOutline;
View Full Code Here

    final CodeModelClassFactory classFactory = outline.getClassFactory();
    final JPackage ppp = outline.getCodeModel()._package(kmlpackage.getPackage().name() + ".annotations");
    classObviousAnnotation = classFactory.createClass(ppp, JMod.PUBLIC, "Obvious", null, ClassType.ANNOTATION_TYPE_DECL);
    classObviousAnnotation.annotate(Target.class).param("value", ElementType.FIELD).param("value", ElementType.METHOD);
    classCoordinateConverter = classFactory.createClass(kmlpackage, JMod.PUBLIC | JMod.FINAL, "CoordinatesConverter", null, ClassType.CLASS);
    classBooleanConverter = classFactory.createClass(kmlpackage, JMod.PUBLIC | JMod.FINAL, "BooleanConverter", null, ClassType.CLASS);
   
    for (final ClassOutline classOutline : outline.getClasses()) {
      final ClassOutlineImpl cc = (ClassOutlineImpl) classOutline;

      if (cc.implRef.name().equals("Coordinate")) {
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.