com.sun.tools.xjc.Driver类的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中com.sun.tools.xjc.Driver类的一些代码示例,展示了Driver类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Driver类的具体详情如下:
包路径:com.sun.tools.xjc.Driver
类名称:Driver

Driver介绍

[英]Command Line Interface of XJC.
[中]XJC的命令行界面。

代码示例

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

private static void _main( String[] args ) throws Exception {
  try {
    System.exit(run( args, System.out, System.out ));
  } catch (BadCommandLineException e) {
    // there was an error in the command line.
    // print usage and abort.
    if(e.getMessage()!=null) {
      System.out.println(e.getMessage());
      System.out.println();
    }
    usage(e.getOptions(),false);
    System.exit(-1);
  }
}

代码示例来源:origin: apache/cxf

private void checkEncoding(ToolContext c) {
  String encoding = (String)c.get(ToolConstants.CFG_ENCODING);
  if (encoding != null) {
    try {
      CodeWriter.class.getDeclaredField("encoding");
    } catch (Throwable t) {
      c.remove(ToolConstants.CFG_ENCODING);
      String fenc = System.getProperty("file.encoding");
      if (!encoding.equals(fenc)) {
        LOG.log(Level.WARNING, "JAXB_NO_ENCODING_SUPPORT",
            new String[] {Driver.getBuildID(), fenc});
      }
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

public static void main(final String[] args) throws Exception {
  // use the platform default proxy if available.
  // see sun.net.spi.DefaultProxySelector for details.
  setupProxies();
  if( Util.getSystemProperty(Driver.class,"noThreadSwap")!=null )
    _main(args);    // for the ease of debugging
  // run all the work in another thread so that the -Xss option
  // will take effect when compiling a large schema. See
  // http://developer.java.sun.com/developer/bugParade/bugs/4362291.html
  final Throwable[] ex = new Throwable[1];
  Thread th = new Thread() {
    @Override
    public void run() {
      try {
        _main(args);
      } catch( Throwable e ) {
        ex[0]=e;
      }
    }
  };
  th.start();
  th.join();
  if(ex[0]!=null) {
    // re-throw
    if( ex[0] instanceof Exception )
      throw (Exception)ex[0];
    else
      throw (Error)ex[0];
  }
}

代码示例来源:origin: com.github.davidmoten/xjc-maven-plugin-core

public static void main(String[] args) throws Throwable {
    if (Driver.run(args, System.out, System.out) != 0) {
      throw new Exception("xjc call failed, see logs above for details");
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

usage(this,false);
throw new WeAreDone();
usage(this,true);
throw new WeAreDone();

代码示例来源:origin: sun-jaxb/jaxb-xjc

_main(args);    // for the ease of debugging

代码示例来源:origin: com.github.davidmoten/jax-maven-plugin-core

public static void main(String[] args) throws Throwable {
    if (Driver.run(args, System.out, System.out) != 0) {
      throw new Exception("xjc call failed, see logs above for details");
    }
  }
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

usage(this,false);
throw new WeAreDone();
usage(this,true);
throw new WeAreDone();

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

_main(args);    // for the ease of debugging

代码示例来源:origin: sun-jaxb/jaxb-xjc

private static void _main( String[] args ) throws Exception {
  try {
    System.exit(run( args, System.out, System.out ));
  } catch (BadCommandLineException e) {
    // there was an error in the command line.
    // print usage and abort.
    if(e.getMessage()!=null) {
      System.out.println(e.getMessage());
      System.out.println();
    }
    usage(e.getOptions(),false);
    System.exit(-1);
  }
}

代码示例来源:origin: org.jvnet.jaxbcommons/jaxbcommons-testing

/**
 * Runs the test.
 * 
 * @throws Exception
 *             In case a problem occurs during running the test.
 */
public void testRun() throws Exception {
  try {
    Driver.run(getArguments(), System.out, System.err);
  } catch (Exception ex) {
    ex.printStackTrace();
    throw ex;
  }
}

代码示例来源:origin: org.apache.cxf/cxf-tools-wsdlto-databinding-jaxb

private void checkEncoding(ToolContext c) {
  String encoding = (String)c.get(ToolConstants.CFG_ENCODING);
  if (encoding != null) {
    try {
      CodeWriter.class.getDeclaredField("encoding");
    } catch (Throwable t) {
      c.remove(ToolConstants.CFG_ENCODING);
      String fenc = System.getProperty("file.encoding");
      if (!encoding.equals(fenc)) {
        LOG.log(Level.WARNING, "JAXB_NO_ENCODING_SUPPORT",
            new String[] {Driver.getBuildID(), fenc});
      }
    }
  }
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

usage(this,false);
throw new WeAreDone();
usage(this,true);
throw new WeAreDone();

代码示例来源:origin: org.glassfish.metro/webservices-tools

public static void main(final String[] args) throws Exception {
  // use the platform default proxy if available.
  // see sun.net.spi.DefaultProxySelector for details.
  setupProxies();
  if( Util.getSystemProperty(Driver.class,"noThreadSwap")!=null )
    _main(args);    // for the ease of debugging
  // run all the work in another thread so that the -Xss option
  // will take effect when compiling a large schema. See
  // http://developer.java.sun.com/developer/bugParade/bugs/4362291.html
  final Throwable[] ex = new Throwable[1];
  Thread th = new Thread() {
    @Override
    public void run() {
      try {
        _main(args);
      } catch( Throwable e ) {
        ex[0]=e;
      }
    }
  };
  th.start();
  th.join();
  if(ex[0]!=null) {
    // re-throw
    if( ex[0] instanceof Exception )
      throw (Exception)ex[0];
    else
      throw (Error)ex[0];
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

private static void _main( String[] args ) throws Exception {
  try {
    System.exit(run( args, System.out, System.out ));
  } catch (BadCommandLineException e) {
    // there was an error in the command line.
    // print usage and abort.
    if(e.getMessage()!=null) {
      System.out.println(e.getMessage());
      System.out.println();
    }
    usage(e.getOptions(),false);
    System.exit(-1);
  }
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

return run(args,new Listener());

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

log( "build id of XJC is " + Driver.getBuildID(), Project.MSG_VERBOSE );

代码示例来源:origin: sun-jaxb/jaxb-xjc

usage(this,false);
throw new WeAreDone();
usage(this,true);
throw new WeAreDone();

代码示例来源:origin: apache/servicemix-bundles

public static void main(final String[] args) throws Exception {
  // use the platform default proxy if available.
  // see sun.net.spi.DefaultProxySelector for details.
  setupProxies();
  if( Util.getSystemProperty(Driver.class,"noThreadSwap")!=null )
    _main(args);    // for the ease of debugging
  // run all the work in another thread so that the -Xss option
  // will take effect when compiling a large schema. See
  // http://developer.java.sun.com/developer/bugParade/bugs/4362291.html
  final Throwable[] ex = new Throwable[1];
  Thread th = new Thread() {
    @Override
    public void run() {
      try {
        _main(args);
      } catch( Throwable e ) {
        ex[0]=e;
      }
    }
  };
  th.start();
  th.join();
  if(ex[0]!=null) {
    // re-throw
    if( ex[0] instanceof Exception )
      throw (Exception)ex[0];
    else
      throw (Error)ex[0];
  }
}

代码示例来源:origin: apache/servicemix-bundles

private static void _main( String[] args ) throws Exception {
  try {
    System.exit(run( args, System.out, System.out ));
  } catch (BadCommandLineException e) {
    // there was an error in the command line.
    // print usage and abort.
    if(e.getMessage()!=null) {
      System.out.println(e.getMessage());
      System.out.println();
    }
    usage(e.getOptions(),false);
    System.exit(-1);
  }
}

相关文章

微信公众号

最新文章

更多