@SuppressWarnings("null")
private Class<?> getType(String s) throws StreamCorruptedException {
int dim = 0;
while (s.endsWith("[]")) {
s = "" + s.substring(0, s.length() - 2);
dim++;
}
Class<?> c;
final Tag t = Tag.byName(s);
if (t != null)
c = t.c;
else
c = yggdrasil.getClass(s);
if (c == null)
throw new StreamCorruptedException("Invalid type " + s);
if (dim == 0)
return c;
while (dim-- > 0)
c = Array.newInstance(c, 0).getClass();
return c;
}
YggXMLInputStream.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:Skript
作者:
评论列表
文章目录