@Test public void testSets() throws IOException { try { parse("providence", "set<i64>", "{}"); } catch (ParseException e) { assertThat(e.asString(), is( "Error on line 8, pos 2: Expected list start, found {\n" + " {}\n" + "-^")); } assertThat(parse("providence", "set<bool>", "[ 0, true ]"), is(ImmutableSet.of(false, true))); assertThat(parse("providence", "set<i8>", "[ 2, Value.FIFTH ]"), is(ImmutableSet.of((byte) 2, (byte) 8))); assertThat(parse("providence", "set<i16>", "[ 2, Value.FIFTH ]"), is(ImmutableSet.of((short) 2, (short) 8))); assertThat(parse("providence", "set<i32>", "[ 2, Value.FIFTH ]"), is(ImmutableSet.of(2, 8))); assertThat(parse("providence", "set<i64>", "[ 2,\n" + " " Value.FIFTH ]"), is(ImmutableSet.of( 2L, 8L))); assertThat(parse("providence", "set<double>", "[ 2.2 ]"), is(ImmutableSet.of(2.2))); }
public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); Object parse(InputStream inputStream, PDescriptor type); Object parse(Reader reader, PDescriptor type); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); Object parse(InputStream inputStream, PDescriptor type); Object parse(Reader reader, PDescriptor type);  }