本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}