本文整理了Java中com.sun.codemodel.JPackage.propertyFiles()
方法的一些代码示例,展示了JPackage.propertyFiles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPackage.propertyFiles()
方法的具体详情如下:
包路径:com.sun.codemodel.JPackage
类名称:JPackage
方法名:propertyFiles
[英]Iterates all resource files in this package.
[中]迭代此包中的所有资源文件。
代码示例来源:origin: highsource/maven-jaxb2-plugin
private boolean isRelevantPackage(JPackage _package) {
if (_package.propertyFiles().hasNext()) {
return true;
}
Iterator<JDefinedClass> classes = _package.classes();
for (; classes.hasNext();) {
JDefinedClass _class = (JDefinedClass) classes.next();
if (!_class.isHidden()) {
return true;
}
}
return false;
}
}
代码示例来源:origin: highsource/maven-jaxb2-plugin
private boolean isRelevantPackage(JPackage _package) {
if (_package.propertyFiles().hasNext()) {
return true;
}
Iterator<JDefinedClass> classes = _package.classes();
for (; classes.hasNext();) {
JDefinedClass _class = (JDefinedClass) classes.next();
if (!_class.isHidden()) {
return true;
}
}
return false;
}
}
代码示例来源:origin: highsource/maven-jaxb2-plugin
private boolean isRelevantPackage(JPackage _package) {
if (_package.propertyFiles().hasNext()) {
return true;
}
Iterator<JDefinedClass> classes = _package.classes();
for (; classes.hasNext();) {
JDefinedClass _class = (JDefinedClass) classes.next();
if (!_class.isHidden()) {
return true;
}
}
return false;
}
代码示例来源:origin: highsource/maven-jaxb2-plugin
private boolean isRelevantPackage(JPackage _package) {
if (_package.propertyFiles().hasNext()) {
return true;
}
Iterator<JDefinedClass> classes = _package.classes();
for (; classes.hasNext();) {
JDefinedClass _class = (JDefinedClass) classes.next();
if (!_class.isHidden()) {
return true;
}
}
return false;
}
}
代码示例来源:origin: org.jvnet.jaxb2.maven2/maven-jaxb23-plugin
private boolean isRelevantPackage(JPackage _package) {
if (_package.propertyFiles().hasNext()) {
return true;
}
Iterator<JDefinedClass> classes = _package.classes();
for (; classes.hasNext();) {
JDefinedClass _class = (JDefinedClass) classes.next();
if (!_class.isHidden()) {
return true;
}
}
return false;
}
}
代码示例来源:origin: org.jvnet.jaxb2.maven2/maven-jaxb22-plugin
private boolean isRelevantPackage(JPackage _package) {
if (_package.propertyFiles().hasNext()) {
return true;
}
Iterator<JDefinedClass> classes = _package.classes();
for (; classes.hasNext();) {
JDefinedClass _class = (JDefinedClass) classes.next();
if (!_class.isHidden()) {
return true;
}
}
return false;
}
}
代码示例来源:origin: org.jvnet.hyperjaxb3/hyperjaxb3-tools
/**
* Returns a property file (created if necessary).
*
* @param thePackage
* package to create property file
* @param name
* property file name.
* @return Property file.
*/
public static JPropertyFile getOrCreatePropertyFile(JPackage thePackage,
String name) {
JPropertyFile propertyFile = null;
for (Iterator iterator = thePackage.propertyFiles(); iterator.hasNext()
&& (null == propertyFile);) {
final JResourceFile resourceFile = (JResourceFile) iterator.next();
if (resourceFile instanceof JPropertyFile
&& name.equals(resourceFile.name())) {
propertyFile = (JPropertyFile) resourceFile;
}
}
if (null == propertyFile) {
propertyFile = new JPropertyFile(name);
thePackage.addResourceFile(propertyFile);
}
return propertyFile;
}
代码示例来源:origin: org.jvnet.jaxbcommons/jaxbcommons-core
/**
* Returns a property file (created if necessary).
*
* @param thePackage
* package to create property file
* @param name
* property file name.
* @return Property file.
*/
public static JPropertyFile getOrCreatePropertyFile(JPackage thePackage, String name) {
JPropertyFile propertyFile = null;
for (Iterator iterator = thePackage.propertyFiles(); iterator.hasNext()
&& (null == propertyFile);) {
final JResourceFile resourceFile = (JResourceFile) iterator.next();
if (resourceFile instanceof JPropertyFile && name.equals(resourceFile.name())) {
propertyFile = (JPropertyFile) resourceFile;
}
}
if (null == propertyFile) {
propertyFile = new JPropertyFile(name);
thePackage.addResourceFile(propertyFile);
}
return propertyFile;
}
代码示例来源:origin: org.jvnet.jaxb2_commons/jaxb2-basics-tools
/**
* Returns a property file (created if necessary).
*
* @param thePackage
* package to create property file
* @param name
* property file name.
* @return Property file.
*/
public static JPropertyFile getOrCreatePropertyFile(JPackage thePackage,
String name) {
JPropertyFile propertyFile = null;
for (Iterator<JResourceFile> iterator = thePackage.propertyFiles(); iterator
.hasNext() && (null == propertyFile);) {
final JResourceFile resourceFile = (JResourceFile) iterator.next();
if (resourceFile instanceof JPropertyFile
&& name.equals(resourceFile.name())) {
propertyFile = (JPropertyFile) resourceFile;
}
}
if (null == propertyFile) {
propertyFile = new JPropertyFile(name);
thePackage.addResourceFile(propertyFile);
}
return propertyFile;
}
代码示例来源:origin: org.jvnet.jaxb2_commons/tools
/**
* Returns a property file (created if necessary).
*
* @param thePackage
* package to create property file
* @param name
* property file name.
* @return Property file.
*/
public static JPropertyFile getOrCreatePropertyFile(JPackage thePackage,
String name) {
JPropertyFile propertyFile = null;
for (Iterator iterator = thePackage.propertyFiles(); iterator.hasNext()
&& (null == propertyFile);) {
final JResourceFile resourceFile = (JResourceFile) iterator.next();
if (resourceFile instanceof JPropertyFile
&& name.equals(resourceFile.name())) {
propertyFile = (JPropertyFile) resourceFile;
}
}
if (null == propertyFile) {
propertyFile = new JPropertyFile(name);
thePackage.addResourceFile(propertyFile);
}
return propertyFile;
}
代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/tools
/**
* Returns a property file (created if necessary).
*
* @param thePackage
* package to create property file
* @param name
* property file name.
* @return Property file.
*/
public static JPropertyFile getOrCreatePropertyFile(JPackage thePackage,
String name) {
JPropertyFile propertyFile = null;
for (Iterator iterator = thePackage.propertyFiles(); iterator.hasNext()
&& (null == propertyFile);) {
final JResourceFile resourceFile = (JResourceFile) iterator.next();
if (resourceFile instanceof JPropertyFile
&& name.equals(resourceFile.name())) {
propertyFile = (JPropertyFile) resourceFile;
}
}
if (null == propertyFile) {
propertyFile = new JPropertyFile(name);
thePackage.addResourceFile(propertyFile);
}
return propertyFile;
}
内容来源于网络,如有侵权,请联系作者删除!