use of java.lang.Object in project clojure by clojure.
the class LispReader method readDelimitedList.
public static List readDelimitedList(char delim, PushbackReader r, boolean isRecursive, Object opts, Object pendingForms) {
final int firstline = (r instanceof LineNumberingPushbackReader) ? ((LineNumberingPushbackReader) r).getLineNumber() : -1;
ArrayList a = new ArrayList();
for (; ; ) {
Object form = read(r, false, READ_EOF, delim, READ_FINISHED, isRecursive, opts, pendingForms);
if (form == READ_EOF) {
if (firstline < 0)
throw Util.runtimeException("EOF while reading");
else
throw Util.runtimeException("EOF while reading, starting at line " + firstline);
} else if (form == READ_FINISHED) {
return a;
}
a.add(form);
}
}
use of java.lang.Object in project clojure by clojure.
the class LispReader method read.
public static Object read(PushbackReader r, Object opts) {
boolean eofIsError = true;
Object eofValue = null;
if (opts != null && opts instanceof IPersistentMap) {
Object eof = ((IPersistentMap) opts).valAt(OPT_EOF, EOFTHROW);
if (!EOFTHROW.equals(eof)) {
eofIsError = false;
eofValue = eof;
}
}
return read(r, eofIsError, eofValue, false, opts);
}
use of java.lang.Object in project clochure by videlalvaro.
the class LispReader method readNumber.
private static Object readNumber(PushbackReader r, char initch) {
StringBuilder sb = new StringBuilder();
sb.append(initch);
for (; ; ) {
int ch = read1(r);
if (ch == -1 || isWhitespace(ch) || isMacro(ch)) {
unread(r, ch);
break;
}
sb.append((char) ch);
}
String s = sb.toString();
Object n = matchNumber(s);
if (n == null)
throw new NumberFormatException("Invalid number: " + s);
return n;
}
use of java.lang.Object in project intellij-community by JetBrains.
the class FooBar method method.
int method(Object foo) {
FooBar foobar = (FooBar) foo;
Object o = ((FooBar<caret>) foo).baz;
foobar = null;
}
use of java.lang.Object in project jdk8u_jdk by JetBrains.
the class StreamZipEntriesTest method testStreamJar.
@Test
public void testStreamJar() throws IOException {
try (JarFile jf = new JarFile(new File(System.getProperty("test.src", "."), "input.jar"))) {
jf.stream().forEach(e -> assertTrue(e instanceof JarEntry));
Object[] elements = jf.stream().toArray();
assertEquals(3, elements.length);
assertEquals(elements[0].toString(), "META-INF/");
assertEquals(elements[1].toString(), "META-INF/MANIFEST.MF");
assertEquals(elements[2].toString(), "ReleaseInflater.java");
}
}
Aggregations