本文整理了Java中org.apache.openjpa.lib.util.Options.get()
方法的一些代码示例,展示了Options.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.get()
方法的具体详情如下:
包路径:org.apache.openjpa.lib.util.Options
类名称:Options
方法名:get
[英]Specialization of #getBooleanProperty to allow a value to appear under either of two keys; useful for short and long versions of command-line flags.
[中]#getBooleanProperty的特殊化,允许在两个键中的任意一个下显示一个值;适用于命令行标志的短版本和长版本。
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Run the tool. Returns false if invalid options given.
*/
public static boolean run(OpenJPAConfiguration conf, String[] args,
Options opts)
throws IOException {
Flags flags = new Flags();
flags.directory = Files.getFile(opts.removeProperty("directory", "d",
null), null);
flags.addDefaultConstructor = opts.removeBooleanProperty
("addDefaultConstructor", "adc", flags.addDefaultConstructor);
flags.tmpClassLoader = opts.removeBooleanProperty
("tmpClassLoader", "tcl", flags.tmpClassLoader);
flags.enforcePropertyRestrictions = opts.removeBooleanProperty
("enforcePropertyRestrictions", "epr",
flags.enforcePropertyRestrictions);
// for unit testing
BytecodeWriter writer = (BytecodeWriter) opts.get(
PCEnhancer.class.getName() + "#bytecodeWriter");
Configurations.populateConfiguration(conf, opts);
return run(conf, args, flags, null, writer, null);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Run the tool. Returns false if invalid options given.
*/
public static boolean run(OpenJPAConfiguration conf, String[] args,
Options opts)
throws IOException {
Flags flags = new Flags();
flags.directory = Files.getFile(opts.removeProperty("directory", "d",
null), null);
flags.addDefaultConstructor = opts.removeBooleanProperty
("addDefaultConstructor", "adc", flags.addDefaultConstructor);
flags.tmpClassLoader = opts.removeBooleanProperty
("tmpClassLoader", "tcl", flags.tmpClassLoader);
flags.enforcePropertyRestrictions = opts.removeBooleanProperty
("enforcePropertyRestrictions", "epr",
flags.enforcePropertyRestrictions);
// for unit testing
BytecodeWriter writer = (BytecodeWriter) opts.get(
PCEnhancer.class.getName() + "#bytecodeWriter");
Configurations.populateConfiguration(conf, opts);
return run(conf, args, flags, null, writer, null);
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
/**
* Run the tool. Returns false if invalid options given.
*/
public static boolean run(OpenJPAConfiguration conf, String[] args,
Options opts)
throws IOException {
Flags flags = new Flags();
flags.directory = Files.getFile(opts.removeProperty("directory", "d",
null), null);
flags.addDefaultConstructor = opts.removeBooleanProperty
("addDefaultConstructor", "adc", flags.addDefaultConstructor);
flags.tmpClassLoader = opts.removeBooleanProperty
("tmpClassLoader", "tcl", flags.tmpClassLoader);
flags.enforcePropertyRestrictions = opts.removeBooleanProperty
("enforcePropertyRestrictions", "epr",
flags.enforcePropertyRestrictions);
// for unit testing
BytecodeWriter writer = (BytecodeWriter) opts.get(
PCEnhancer.class.getName() + "#bytecodeWriter");
Configurations.populateConfiguration(conf, opts);
return run(conf, args, flags, null, writer, null);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
/**
* Run the tool. Returns false if invalid options given.
*/
public static boolean run(OpenJPAConfiguration conf, String[] args,
Options opts)
throws IOException {
Flags flags = new Flags();
flags.directory = Files.getFile(opts.removeProperty("directory", "d",
null), null);
flags.addDefaultConstructor = opts.removeBooleanProperty
("addDefaultConstructor", "adc", flags.addDefaultConstructor);
flags.tmpClassLoader = opts.removeBooleanProperty
("tmpClassLoader", "tcl", flags.tmpClassLoader);
flags.enforcePropertyRestrictions = opts.removeBooleanProperty
("enforcePropertyRestrictions", "epr",
flags.enforcePropertyRestrictions);
// for unit testing
BytecodeWriter writer = (BytecodeWriter) opts.get(
PCEnhancer.class.getName() + "#bytecodeWriter");
Configurations.populateConfiguration(conf, opts);
return run(conf, args, flags, null, writer, null);
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
/**
* Run the tool. Returns false if invalid options given.
*/
public static boolean run(OpenJPAConfiguration conf, String[] args,
Options opts)
throws IOException {
Flags flags = new Flags();
flags.directory = Files.getFile(opts.removeProperty("directory", "d",
null), null);
flags.addDefaultConstructor = opts.removeBooleanProperty
("addDefaultConstructor", "adc", flags.addDefaultConstructor);
flags.tmpClassLoader = opts.removeBooleanProperty
("tmpClassLoader", "tcl", flags.tmpClassLoader);
flags.enforcePropertyRestrictions = opts.removeBooleanProperty
("enforcePropertyRestrictions", "epr",
flags.enforcePropertyRestrictions);
// for unit testing
BytecodeWriter writer = (BytecodeWriter) opts.get(
PCEnhancer.class.getName() + "#bytecodeWriter");
Configurations.populateConfiguration(conf, opts);
return run(conf, args, flags, null, writer, null);
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
opts.put("schemas", opts.get("s"));
代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc
opts.put("schemas", opts.get("s"));
代码示例来源:origin: org.apache.openjpa/openjpa-all
opts.put("schemas", opts.get("s"));
代码示例来源:origin: org.apache.openjpa/openjpa-jdbc
opts.put("schemas", opts.get("s"));
代码示例来源:origin: org.apache.openejb.patch/openjpa
opts.put("schemas", opts.get("s"));
内容来源于网络,如有侵权,请联系作者删除!