public Object parse() throws RuntimeException { NBTList list = new NBTList(); for (TypeParser var2 : parsers) { list.add(nbtUtils.getValue(var2.parse())); } return list.getHandle(); }
public Object parse() throws RuntimeException { NBTCompound result = new NBTCompound(); for (TypeParser parser : this.parsers) { String key = parser.name; if (key.startsWith("\"") && key.endsWith("\"")) { key = StringParser.parse(key.substring(1, key.length() - 1)); } result.put(key, (nbtUtils.getValue(parser.parse()))); } return result.getHandle(); }
public static ListType<?> getInstance(TypeParser parser) throws ConfigurationException, SyntaxException { List<AbstractType<?>> l = parser.getTypeParameters(); if (l.size() != 1) throw new ConfigurationException("ListType takes exactly 1 type parameter"); return getInstance(l.get(0)); }
@Override public String toString(boolean ignoreFreezing) { boolean includeFrozenType = !ignoreFreezing && !isMultiCell(); StringBuilder sb = new StringBuilder(); if (includeFrozenType) sb.append(FrozenType.class.getName()).append("("); sb.append(getClass().getName()); sb.append( TypeParser.stringifyTypeParameters( Collections.<AbstractType<?>>singletonList(elements), ignoreFreezing || !isMultiCell)); if (includeFrozenType) sb.append(")"); return sb.toString(); }
protected void appendToStringBuilder(StringBuilder sb) { sb.append(getClass().getName()) .append( TypeParser.stringifyTypeParameters( Collections.<AbstractType<?>>singletonList(elements))); }