当前位置: 首页>>代码示例>>Java>>正文


Java Options.addBindFile方法代码示例

本文整理汇总了Java中com.sun.tools.xjc.Options.addBindFile方法的典型用法代码示例。如果您正苦于以下问题:Java Options.addBindFile方法的具体用法?Java Options.addBindFile怎么用?Java Options.addBindFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.tools.xjc.Options的用法示例。


在下文中一共展示了Options.addBindFile方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createOptions

import com.sun.tools.xjc.Options; //导入方法依赖的package包/类
public Options createOptions() throws IOException, BadCommandLineException {
	final Options options = new Options();
	options.targetDir = targetDirectory;
	options.verbose = true;
	options.debugMode = false;
	options.setSchemaLanguage(Language.XMLSCHEMA);
	options.strictCheck = false;
	options.readOnly = false;
	options.compatibilityMode = Options.EXTENSION;
	// options.set

	if (schemas != null) {
		for (final File schema : schemas) {
			options.addGrammar(schema);
		}
	}

	if (bindings != null) {
		for (File binding : bindings) {
			options.addBindFile(binding);
		}
	}

	if (catalog != null) {
		options.addCatalog(catalog);
	}
	options.parseArguments(getArguments());
	return options;
}
 
开发者ID:highsource,项目名称:hyperjaxb3,代码行数:30,代码来源:DynamicCompiler.java

示例2: createOptions

import com.sun.tools.xjc.Options; //导入方法依赖的package包/类
/**
 * Creates and initializes an instance of XJC options.
 *
 */
public Options createOptions(OptionsConfiguration optionsConfiguration)
		throws MojoExecutionException {
	final Options options = new Options();

	options.verbose = optionsConfiguration.isVerbose();
	options.debugMode = optionsConfiguration.isDebugMode();

	options.classpaths.addAll(optionsConfiguration.getPlugins());

	options.target = SpecVersion.V2_1;

	options.setSchemaLanguage(createLanguage(optionsConfiguration
			.getSchemaLanguage()));

	options.entityResolver = optionsConfiguration.getEntityResolver();

	for (InputSource grammar : optionsConfiguration.getGrammars()) {
		options.addGrammar(grammar);
	}

	for (InputSource bindFile : optionsConfiguration.getBindFiles()) {
		options.addBindFile(bindFile);
	}

	// Setup Other Options

	options.defaultPackage = optionsConfiguration.getGeneratePackage();
	options.targetDir = optionsConfiguration.getGenerateDirectory();

	options.strictCheck = optionsConfiguration.isStrict();
	options.readOnly = optionsConfiguration.isReadOnly();
	options.packageLevelAnnotations = optionsConfiguration
			.isPackageLevelAnnotations();
	options.noFileHeader = optionsConfiguration.isNoFileHeader();
	options.enableIntrospection = optionsConfiguration
			.isEnableIntrospection();
	// options.disableXmlSecurity =
	// optionsConfiguration.isDisableXmlSecurity();
	if (optionsConfiguration.getAccessExternalSchema() != null) {
		System.setProperty("javax.xml.accessExternalSchema",
				optionsConfiguration.getAccessExternalSchema());
	}
	if (optionsConfiguration.getAccessExternalDTD() != null) {
		System.setProperty("javax.xml.accessExternalDTD",
				optionsConfiguration.getAccessExternalDTD());
	}
	options.contentForWildcard = optionsConfiguration
			.isContentForWildcard();

	if (optionsConfiguration.isExtension()) {
		options.compatibilityMode = Options.EXTENSION;
	}

	final List<String> arguments = optionsConfiguration.getArguments();
	try {
		options.parseArguments(arguments.toArray(new String[arguments
				.size()]));
	}

	catch (BadCommandLineException bclex) {
		throw new MojoExecutionException("Error parsing the command line ["
				+ arguments + "]", bclex);
	}

	return options;
}
 
开发者ID:highsource,项目名称:maven-jaxb2-plugin,代码行数:71,代码来源:OptionsFactory.java

示例3: createOptions

import com.sun.tools.xjc.Options; //导入方法依赖的package包/类
/**
 * Creates and initializes an instance of XJC options.
 * 
 */
public Options createOptions(OptionsConfiguration optionsConfiguration)
		throws MojoExecutionException {
	final Options options = new Options();

	options.verbose = optionsConfiguration.isVerbose();
	options.debugMode = optionsConfiguration.isDebugMode();

	options.classpaths.addAll(optionsConfiguration.getPlugins());

	options.target = createSpecVersion(optionsConfiguration
			.getSpecVersion());

	final String encoding = optionsConfiguration.getEncoding();

	if (encoding != null) {
		options.encoding = createEncoding(encoding);
	}

	options.setSchemaLanguage(createLanguage(optionsConfiguration
			.getSchemaLanguage()));

	options.entityResolver = optionsConfiguration.getEntityResolver();

	for (InputSource grammar : optionsConfiguration.getGrammars()) {
		options.addGrammar(grammar);
	}

	for (InputSource bindFile : optionsConfiguration.getBindFiles()) {
		options.addBindFile(bindFile);
	}

	// Setup Other Options

	options.defaultPackage = optionsConfiguration.getGeneratePackage();
	options.targetDir = optionsConfiguration.getGenerateDirectory();

	options.strictCheck = optionsConfiguration.isStrict();
	options.readOnly = optionsConfiguration.isReadOnly();
	options.packageLevelAnnotations = optionsConfiguration
			.isPackageLevelAnnotations();
	options.noFileHeader = optionsConfiguration.isNoFileHeader();
	options.enableIntrospection = optionsConfiguration
			.isEnableIntrospection();
	options.disableXmlSecurity = optionsConfiguration
			.isDisableXmlSecurity();

	if (optionsConfiguration.getAccessExternalSchema() != null) {
		System.setProperty("javax.xml.accessExternalSchema",
				optionsConfiguration.getAccessExternalSchema());
	}
	if (optionsConfiguration.getAccessExternalDTD() != null) {
		System.setProperty("javax.xml.accessExternalDTD",
				optionsConfiguration.getAccessExternalDTD());
	}
	options.contentForWildcard = optionsConfiguration
			.isContentForWildcard();

	if (optionsConfiguration.isExtension()) {
		options.compatibilityMode = Options.EXTENSION;
	}

	final List<String> arguments = optionsConfiguration.getArguments();
	try {
		options.parseArguments(arguments.toArray(new String[arguments
				.size()]));
	}

	catch (BadCommandLineException bclex) {
		throw new MojoExecutionException("Error parsing the command line ["
				+ arguments + "]", bclex);
	}

	return options;
}
 
开发者ID:highsource,项目名称:maven-jaxb2-plugin,代码行数:79,代码来源:OptionsFactory.java

示例4: createOptions

import com.sun.tools.xjc.Options; //导入方法依赖的package包/类
/**
 * Creates and initializes an instance of XJC options.
 *
 */
public Options createOptions(OptionsConfiguration optionsConfiguration)
		throws MojoExecutionException {
	final Options options = new Options();

	options.verbose = optionsConfiguration.isVerbose();
	options.debugMode = optionsConfiguration.isDebugMode();

	options.classpaths.addAll(optionsConfiguration.getPlugins());

	options.target = SpecVersion.V2_2;

	final String encoding = optionsConfiguration.getEncoding();

	if (encoding != null) {
		options.encoding = createEncoding(encoding);
	}

	options.setSchemaLanguage(createLanguage(optionsConfiguration
			.getSchemaLanguage()));

	options.entityResolver = optionsConfiguration.getEntityResolver();

	for (InputSource grammar : optionsConfiguration.getGrammars()) {
		options.addGrammar(grammar);
	}

	for (InputSource bindFile : optionsConfiguration.getBindFiles()) {
		options.addBindFile(bindFile);
	}

	// Setup Other Options

	options.defaultPackage = optionsConfiguration.getGeneratePackage();
	options.targetDir = optionsConfiguration.getGenerateDirectory();

	options.strictCheck = optionsConfiguration.isStrict();
	options.readOnly = optionsConfiguration.isReadOnly();
	options.packageLevelAnnotations = optionsConfiguration
			.isPackageLevelAnnotations();
	options.noFileHeader = optionsConfiguration.isNoFileHeader();
	options.enableIntrospection = optionsConfiguration
			.isEnableIntrospection();
	options.disableXmlSecurity = optionsConfiguration
			.isDisableXmlSecurity();
	if (optionsConfiguration.getAccessExternalSchema() != null) {
		System.setProperty("javax.xml.accessExternalSchema",
				optionsConfiguration.getAccessExternalSchema());
	}
	if (optionsConfiguration.getAccessExternalDTD() != null) {
		System.setProperty("javax.xml.accessExternalDTD",
				optionsConfiguration.getAccessExternalDTD());
	}
	options.contentForWildcard = optionsConfiguration
			.isContentForWildcard();

	if (optionsConfiguration.isExtension()) {
		options.compatibilityMode = Options.EXTENSION;
	}

	final List<String> arguments = optionsConfiguration.getArguments();
	try {
		options.parseArguments(arguments.toArray(new String[arguments
				.size()]));
	}

	catch (BadCommandLineException bclex) {
		throw new MojoExecutionException("Error parsing the command line ["
				+ arguments + "]", bclex);
	}

	return options;
}
 
开发者ID:highsource,项目名称:maven-jaxb2-plugin,代码行数:77,代码来源:OptionsFactory.java

示例5: createOptions

import com.sun.tools.xjc.Options; //导入方法依赖的package包/类
/**
 * Creates and initializes an instance of XJC options.
 *
 */
public Options createOptions(OptionsConfiguration optionsConfiguration)
		throws MojoExecutionException {
	final Options options = new Options();

	options.verbose = optionsConfiguration.isVerbose();
	options.debugMode = optionsConfiguration.isDebugMode();

	options.classpaths.addAll(optionsConfiguration.getPlugins());

	options.setSchemaLanguage(createLanguage(optionsConfiguration
			.getSchemaLanguage()));

	options.entityResolver = optionsConfiguration.getEntityResolver();

	for (InputSource grammar : optionsConfiguration.getGrammars()) {
		options.addGrammar(grammar);
	}

	for (InputSource bindFile : optionsConfiguration.getBindFiles()) {
		options.addBindFile(bindFile);
	}

	// Setup Other Options

	options.defaultPackage = optionsConfiguration.getGeneratePackage();
	options.targetDir = optionsConfiguration.getGenerateDirectory();

	options.strictCheck = optionsConfiguration.isStrict();
	options.readOnly = optionsConfiguration.isReadOnly();
	options.packageLevelAnnotations = optionsConfiguration
			.isPackageLevelAnnotations();
	options.noFileHeader = optionsConfiguration.isNoFileHeader();
	// options.enableIntrospection =
	// optionsConfiguration.isEnableIntrospection();
	// options.disableXmlSecurity =
	// optionsConfiguration.isDisableXmlSecurity();
	if (optionsConfiguration.getAccessExternalSchema() != null) {
		System.setProperty("javax.xml.accessExternalSchema",
				optionsConfiguration.getAccessExternalSchema());
	}
	if (optionsConfiguration.getAccessExternalDTD() != null) {
		System.setProperty("javax.xml.accessExternalDTD",
				optionsConfiguration.getAccessExternalDTD());
	}
	// options.contentForWildcard =
	// optionsConfiguration.isContentForWildcard()

	if (optionsConfiguration.isExtension()) {
		options.compatibilityMode = Options.EXTENSION;
	}

	final List<String> arguments = optionsConfiguration.getArguments();
	try {
		options.parseArguments(arguments.toArray(new String[arguments
				.size()]));
	}

	catch (BadCommandLineException bclex) {
		throw new MojoExecutionException("Error parsing the command line ["
				+ arguments + "]", bclex);
	}

	return options;
}
 
开发者ID:highsource,项目名称:maven-jaxb2-plugin,代码行数:69,代码来源:OptionsFactory.java


注:本文中的com.sun.tools.xjc.Options.addBindFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。