本文整理了Java中aQute.lib.spring.XMLType.toPackage()
方法的一些代码示例,展示了XMLType.toPackage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLType.toPackage()
方法的具体详情如下:
包路径:aQute.lib.spring.XMLType
类名称:XMLType
方法名:toPackage
暂无
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
static String toPackage(String fqn) {
int n = fqn.lastIndexOf('.');
if (n < 0 || n + 1 >= fqn.length())
return null;
char c = fqn.charAt(n + 1);
if (Character.isJavaIdentifierStart(c) && Character.isUpperCase(c)) {
String other = fqn.substring(0, n);
return toPackage(other);
}
return fqn;
}
代码示例来源:origin: biz.aQute.bnd/bnd
static String toPackage(String fqn) {
int n = fqn.lastIndexOf('.');
if ( n < 0 || n + 1 >= fqn.length())
return null;
char c = fqn.charAt(n+1);
if ( Character.isJavaIdentifierStart(c) && Character.isUpperCase(c) ) {
String other = fqn.substring(0, n);
return toPackage(other);
}
return fqn;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
static String toPackage(String fqn) {
int n = fqn.lastIndexOf('.');
if ( n < 0 || n + 1 >= fqn.length())
return null;
char c = fqn.charAt(n+1);
if ( Character.isJavaIdentifierStart(c) && Character.isUpperCase(c) ) {
String other = fqn.substring(0, n);
return toPackage(other);
}
return fqn;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
static String toPackage(String fqn) {
int n = fqn.lastIndexOf('.');
if (n < 0 || n + 1 >= fqn.length())
return null;
char c = fqn.charAt(n + 1);
if (Character.isJavaIdentifierStart(c) && Character.isUpperCase(c)) {
String other = fqn.substring(0, n);
return toPackage(other);
}
return fqn;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public Set<String> analyze(InputStream in) throws Exception {
Set<String> refers = new HashSet<String>();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
Result r = new StreamResult(bout);
Source s = new StreamSource(in);
transformer.transform(s, r);
ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
bout.close();
BufferedReader br = new BufferedReader(new InputStreamReader(bin, "UTF8"));
String line = br.readLine();
while (line != null) {
line = line.trim();
if (line.length() > 0) {
String parts[] = line.split("\\s*,\\s*");
for (int i = 0; i < parts.length; i++) {
String pack = toPackage(parts[i]);
if (pack != null)
refers.add( pack );
}
}
line = br.readLine();
}
br.close();
return refers;
}
代码示例来源:origin: biz.aQute.bnd/bnd
public Set<String> analyze(InputStream in) throws Exception {
Set<String> refers = new HashSet<String>();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
Result r = new StreamResult(bout);
Source s = new StreamSource(in);
transformer.transform(s, r);
ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
bout.close();
BufferedReader br = new BufferedReader(new InputStreamReader(bin, "UTF8"));
String line = br.readLine();
while (line != null) {
line = line.trim();
if (line.length() > 0) {
String parts[] = line.split("\\s*,\\s*");
for (int i = 0; i < parts.length; i++) {
String pack = toPackage(parts[i]);
if (pack != null)
refers.add( pack );
}
}
line = br.readLine();
}
br.close();
return refers;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public Set<String> analyze(InputStream in) throws Exception {
Set<String> refers = new HashSet<>();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
Result r = new StreamResult(bout);
Source s = new StreamSource(in);
transformer.transform(s, r);
try (BufferedReader br = IO.reader(bout.toString("UTF-8"))) {
String line = br.readLine();
while (line != null) {
line = line.trim();
if (line.length() > 0) {
String parts[] = line.split("\\s*,\\s*");
for (int i = 0; i < parts.length; i++) {
String pack = toPackage(parts[i]);
if (pack != null)
refers.add(pack);
}
}
line = br.readLine();
}
}
return refers;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public Set<String> analyze(InputStream in) throws Exception {
Set<String> refers = new HashSet<>();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
Result r = new StreamResult(bout);
Source s = new StreamSource(in);
transformer.transform(s, r);
try (BufferedReader br = IO.reader(bout.toString("UTF-8"))) {
String line = br.readLine();
while (line != null) {
line = line.trim();
if (line.length() > 0) {
String parts[] = line.split("\\s*,\\s*");
for (int i = 0; i < parts.length; i++) {
String pack = toPackage(parts[i]);
if (pack != null)
refers.add(pack);
}
}
line = br.readLine();
}
}
return refers;
}
内容来源于网络,如有侵权,请联系作者删除!