diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TBufferedReader.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TBufferedReader.java new file mode 100644 index 000000000..04338c6df --- /dev/null +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TBufferedReader.java @@ -0,0 +1,185 @@ +/* + * Copyright 2014 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.classlib.java.io; + +import org.teavm.classlib.java.lang.TIllegalArgumentException; +import org.teavm.classlib.java.lang.TMath; +import org.teavm.classlib.java.lang.TString; +import org.teavm.classlib.java.lang.TStringBuilder; +import org.teavm.classlib.java.util.TArrays; + +/** + * + * @author Alexey Andreev + */ +public class TBufferedReader extends TReader { + private TReader innerReader; + private char[] buffer; + private int index; + private int count; + private boolean eof; + private int mark = -1; + + public TBufferedReader(TReader innerReader, int size) { + if (size < 0) { + throw new TIllegalArgumentException(); + } + this.innerReader = innerReader; + this.buffer = new char[TMath.min(64, size)]; + } + + public TBufferedReader(TReader innerReader) { + this(innerReader, 1024); + } + + @Override + public int read() throws TIOException { + requireOpened(); + if (index >= count) { + if (!fillBuffer(0)) { + return -1; + } + } + return buffer[index++]; + } + + @Override + public void close() throws TIOException { + requireOpened(); + innerReader.close(); + innerReader = null; + } + + @Override + public int read(char[] cbuf, int off, int len) throws TIOException { + requireOpened(); + if (index == count && eof) { + return -1; + } + int charsRead = 0; + while (charsRead < len) { + int n = TMath.min(count - index, len - charsRead); + for (int i = 0; i < n; ++i) { + cbuf[off++] = buffer[index++]; + } + charsRead += n; + if (!fillBuffer(0)) { + break; + } + } + return charsRead; + } + + public TString readLine() throws TIOException { + requireOpened(); + if (eof && index == count) { + return null; + } + TStringBuilder line = new TStringBuilder(); + while (true) { + if (index >= count) { + if (!fillBuffer(0)) { + break; + } + } + char ch = buffer[index++]; + if (ch == '\n') { + break; + } else if (ch == '\r') { + if (index >= count) { + if (!fillBuffer(0)) { + break; + } + } + if (buffer[index] == '\n') { + ++index; + } + break; + } else { + line.append(ch); + } + } + return TString.wrap(line.toString()); + } + + @Override + public long skip(long n) throws TIOException { + requireOpened(); + if (n < count - index) { + index += n; + } else { + n -= (count - index); + if (innerReader.skip(n) == n) { + fillBuffer(0); + } + } + return super.skip(n); + } + + @Override + public boolean ready() { + return index < count; + } + + @Override + public void mark(int readAheadLimit) throws TIOException { + if (readAheadLimit > buffer.length) { + buffer = TArrays.copyOf(buffer, readAheadLimit); + } + if (count - index < readAheadLimit) { + for (int i = index; i < count; ++i) { + buffer[i - index] = buffer[i]; + } + fillBuffer(count - index); + } + mark = index; + } + + @Override + public void reset() throws TIOException { + if (mark == -1) { + throw new TIOException(); + } + index = mark; + } + + private boolean fillBuffer(int offset) throws TIOException { + if (eof) { + return false; + } + while (true) { + int charsRead = innerReader.read(buffer, offset, buffer.length - 1); + if (charsRead == -1) { + eof = true; + break; + } else if (charsRead == 0) { + break; + } else { + offset += charsRead; + } + } + count = offset; + index = 0; + mark = -1; + return true; + } + + private void requireOpened() { + if (innerReader == null) { + throw new TIOException(); + } + } +} diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TCloseable.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TCloseable.java index 1a0c5c117..52735c541 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TCloseable.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TCloseable.java @@ -23,5 +23,5 @@ import org.teavm.classlib.java.lang.TAutoCloseable; */ public interface TCloseable extends TAutoCloseable { @Override - void close() throws TIOException; + public void close() throws TIOException; } diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TStringReader.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TStringReader.java new file mode 100644 index 000000000..74f99efe7 --- /dev/null +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/io/TStringReader.java @@ -0,0 +1,109 @@ +/* + * Copyright 2014 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.classlib.java.io; + +import org.teavm.classlib.java.lang.TIllegalArgumentException; +import org.teavm.classlib.java.lang.TMath; +import org.teavm.classlib.java.lang.TNullPointerException; +import org.teavm.classlib.java.lang.TString; + +/** + * + * @author Alexey Andreev + */ +public class TStringReader extends TReader { + private TString string; + private int index; + private int mark = 0; + + public TStringReader(TString string) { + if (string == null) { + throw new TNullPointerException(); + } + this.string = string; + } + + @Override + public int read() throws TIOException { + checkOpened(); + if (index >= string.length()) { + return -1; + } + return string.charAt(index++); + } + + @Override + public int read(char[] cbuf, int off, int len) throws TIOException { + checkOpened(); + if (index >= string.length()) { + return -1; + } + int n = TMath.min(string.length() - index, len); + for (int i = 0; i < n; ++i) { + cbuf[off++] = string.charAt(index++); + } + return n; + } + + @Override + public long skip(long n) throws TIOException { + checkOpened(); + if (n < 0) { + n = TMath.max(n, -index); + } else { + n = TMath.min(string.length() - index, n); + } + index += n; + return n; + } + + @Override + public boolean ready() throws TIOException { + checkOpened(); + return true; + } + + @Override + public boolean markSupported() { + return true; + } + + @Override + public void mark(int readAheadLimit) throws TIOException { + checkOpened(); + if (readAheadLimit < 0) { + throw new TIllegalArgumentException(); + } + mark = index; + } + + @Override + public void reset() throws TIOException { + checkOpened(); + index = mark; + } + + @Override + public void close() { + string = null; + } + + private void checkOpened() throws TIOException { + if (string == null) { + throw new TIOException(); + } + } +} diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TByte.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TByte.java new file mode 100644 index 000000000..536f219b3 --- /dev/null +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TByte.java @@ -0,0 +1,88 @@ +/* + * Copyright 2014 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.classlib.java.lang; + +import org.teavm.javascript.ni.Rename; + +/** + * + * @author Alexey Andreev + */ +public class TByte extends TNumber implements TComparable { + private byte value; + + public TByte(byte value) { + this.value = value; + } + + @Override + public int intValue() { + return value; + } + + @Override + public long longValue() { + return value; + } + + @Override + public float floatValue() { + return value; + } + + @Override + public double doubleValue() { + return value; + } + + @Override + public byte byteValue() { + return value; + } + + public static TByte valueOf(byte value) { + return new TByte(value); + } + + public static TString toString(byte value) { + return TString.wrap(new StringBuilder().append(value).toString()); + } + + @Override + @Rename("toString") + public TString toString0() { + return toString(value); + } + + @Override + public boolean equals(TObject other) { + return other instanceof TByte && ((TByte)other).value == value; + } + + @Override + public int hashCode() { + return value; + } + + public static int compare(byte a, byte b) { + return a - b; + } + + @Override + public int compareTo(TByte other) { + return compare(value, other.value); + } +} diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TCharacter.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TCharacter.java index 50630cbc1..b1d0761da 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TCharacter.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TCharacter.java @@ -15,6 +15,7 @@ */ package org.teavm.classlib.java.lang; +import org.teavm.classlib.impl.charset.UTF16Helper; import org.teavm.classlib.impl.unicode.UnicodeHelper; import org.teavm.dependency.PluggableDependency; import org.teavm.javascript.ni.GeneratedBy; @@ -109,4 +110,23 @@ public class TCharacter extends TObject { @GeneratedBy(CharacterNativeGenerator.class) @PluggableDependency(CharacterNativeGenerator.class) private static native String obtainDigitMapping(); + + public static int toChars(int codePoint, char[] dst, int dstIndex) { + if (codePoint >= UTF16Helper.SUPPLEMENTARY_PLANE) { + dst[dstIndex] = UTF16Helper.highSurrogate(codePoint); + dst[dstIndex + 1] = UTF16Helper.lowSurrogate(codePoint); + return 2; + } else { + dst[dstIndex] = (char)codePoint; + return 1; + } + } + + public static char[] toChars(int codePoint) { + if (codePoint >= UTF16Helper.SUPPLEMENTARY_PLANE) { + return new char[] { UTF16Helper.highSurrogate(codePoint), UTF16Helper.lowSurrogate(codePoint) }; + } else { + return new char[] { (char)codePoint }; + } + } } diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TShort.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TShort.java new file mode 100644 index 000000000..b174c135b --- /dev/null +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TShort.java @@ -0,0 +1,88 @@ +/* + * Copyright 2014 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.classlib.java.lang; + +import org.teavm.javascript.ni.Rename; + +/** + * + * @author Alexey Andreev + */ +public class TShort extends TNumber implements TComparable { + private short value; + + public TShort(short value) { + this.value = value; + } + + @Override + public int intValue() { + return value; + } + + @Override + public long longValue() { + return value; + } + + @Override + public float floatValue() { + return value; + } + + @Override + public double doubleValue() { + return value; + } + + @Override + public short shortValue() { + return value; + } + + public static TShort valueOf(short value) { + return new TShort(value); + } + + public static TString toString(short value) { + return TString.wrap(new StringBuilder().append(value).toString()); + } + + @Override + @Rename("toString") + public TString toString0() { + return toString(value); + } + + @Override + public boolean equals(TObject other) { + return other instanceof TShort && ((TShort)other).value == value; + } + + @Override + public int hashCode() { + return value; + } + + public static int compare(short a, short b) { + return a - b; + } + + @Override + public int compareTo(TShort other) { + return compare(value, other.value); + } +} diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/io/BufferedReaderTest.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/io/BufferedReaderTest.java new file mode 100644 index 000000000..8787b706b --- /dev/null +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/io/BufferedReaderTest.java @@ -0,0 +1,98 @@ +/* + * Copyright 2014 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.classlib.java.io; + +import static org.junit.Assert.*; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import org.junit.Test; + +/** + * + * @author Alexey Andreev + */ +public class BufferedReaderTest { + @Test + public void readsCharacters() throws IOException { + String str = "foo bar baz"; + BufferedReader reader = new BufferedReader(new StringReader(str)); + char[] chars = new char[100]; + int charsRead = reader.read(chars); + assertEquals(str.length(), charsRead); + assertEquals(str.charAt(0), chars[0]); + assertEquals(str.charAt(charsRead - 1), chars[charsRead - 1]); + assertEquals(0, chars[charsRead]); + } + + @Test + public void readsCharactersOneByOne() throws IOException { + String str = "foo"; + BufferedReader reader = new BufferedReader(new StringReader(str)); + assertEquals('f', reader.read()); + assertEquals('o', reader.read()); + assertEquals('o', reader.read()); + assertEquals(-1, reader.read()); + assertEquals(-1, reader.read()); + } + + @Test + public void readsLine() throws IOException { + String str = "foo\nbar\rbaz\r\nA\n\nB"; + BufferedReader reader = new BufferedReader(new StringReader(str)); + assertEquals("foo", reader.readLine()); + assertEquals("bar", reader.readLine()); + assertEquals("baz", reader.readLine()); + assertEquals("A", reader.readLine()); + assertEquals("", reader.readLine()); + assertEquals("B", reader.readLine()); + assertNull(reader.readLine()); + assertNull(reader.readLine()); + } + + @Test + public void fillsBuffer() throws IOException { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 1000; ++i) { + sb.append((char)i); + } + BufferedReader reader = new BufferedReader(new StringReader(sb.toString()), 101); + char[] buffer = new char[500]; + reader.read(buffer); + assertEquals(0, buffer[0]); + assertEquals(1, buffer[1]); + assertEquals(499, buffer[499]); + } + + @Test + public void leavesMark() throws IOException { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 1000; ++i) { + sb.append((char)i); + } + BufferedReader reader = new BufferedReader(new StringReader(sb.toString()), 100); + reader.skip(50); + reader.mark(70); + reader.skip(60); + reader.reset(); + char[] buffer = new char[150]; + int charsRead = reader.read(buffer); + assertEquals(150, charsRead); + assertEquals(50, buffer[0]); + assertEquals(51, buffer[1]); + assertEquals(199, buffer[149]); + } +} diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/io/InputStreamReaderTest.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/io/InputStreamReaderTest.java similarity index 98% rename from teavm-classlib/src/test/java/org/teavm/classlib/java/lang/io/InputStreamReaderTest.java rename to teavm-classlib/src/test/java/org/teavm/classlib/java/io/InputStreamReaderTest.java index 344b6a941..d53595919 100644 --- a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/io/InputStreamReaderTest.java +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/io/InputStreamReaderTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.classlib.java.lang.io; +package org.teavm.classlib.java.io; import static org.junit.Assert.*; import java.io.ByteArrayInputStream; diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ArrayListTest.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/ArrayListTest.java similarity index 98% rename from teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ArrayListTest.java rename to teavm-classlib/src/test/java/org/teavm/classlib/java/util/ArrayListTest.java index ac15aaaee..5410fef9b 100644 --- a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ArrayListTest.java +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/ArrayListTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.classlib.java.lang.util; +package org.teavm.classlib.java.util; import static org.junit.Assert.*; import java.util.ArrayList; diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ArraysTest.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/ArraysTest.java similarity index 97% rename from teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ArraysTest.java rename to teavm-classlib/src/test/java/org/teavm/classlib/java/util/ArraysTest.java index 2fb4597dc..773178c47 100644 --- a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ArraysTest.java +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/ArraysTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.classlib.java.lang.util; +package org.teavm.classlib.java.util; import static org.junit.Assert.*; import java.util.Arrays; diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/CollectionsTest.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/CollectionsTest.java similarity index 97% rename from teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/CollectionsTest.java rename to teavm-classlib/src/test/java/org/teavm/classlib/java/util/CollectionsTest.java index b873997ec..035628771 100644 --- a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/CollectionsTest.java +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/CollectionsTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.classlib.java.lang.util; +package org.teavm.classlib.java.util; import static org.junit.Assert.assertEquals; import java.util.ArrayList; diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ServiceLoaderTest.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/ServiceLoaderTest.java similarity index 96% rename from teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ServiceLoaderTest.java rename to teavm-classlib/src/test/java/org/teavm/classlib/java/util/ServiceLoaderTest.java index 9093fdc88..13ca0bb1d 100644 --- a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/ServiceLoaderTest.java +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/ServiceLoaderTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.classlib.java.lang.util; +package org.teavm.classlib.java.util; import static org.junit.Assert.*; import java.util.ServiceLoader; diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/TestService.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/TestService.java similarity index 94% rename from teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/TestService.java rename to teavm-classlib/src/test/java/org/teavm/classlib/java/util/TestService.java index 540f9787f..dcd4d7ed7 100644 --- a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/TestService.java +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/TestService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.classlib.java.lang.util; +package org.teavm.classlib.java.util; /** * diff --git a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/TestServiceImpl.java b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/TestServiceImpl.java similarity index 95% rename from teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/TestServiceImpl.java rename to teavm-classlib/src/test/java/org/teavm/classlib/java/util/TestServiceImpl.java index 1e3a05ceb..c5ff7a3de 100644 --- a/teavm-classlib/src/test/java/org/teavm/classlib/java/lang/util/TestServiceImpl.java +++ b/teavm-classlib/src/test/java/org/teavm/classlib/java/util/TestServiceImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.classlib.java.lang.util; +package org.teavm.classlib.java.util; /** * diff --git a/teavm-classlib/src/test/resources/META-INF/services/org.teavm.classlib.java.lang.util.TestService b/teavm-classlib/src/test/resources/META-INF/services/org.teavm.classlib.java.lang.util.TestService deleted file mode 100644 index 277015e69..000000000 --- a/teavm-classlib/src/test/resources/META-INF/services/org.teavm.classlib.java.lang.util.TestService +++ /dev/null @@ -1 +0,0 @@ -org.teavm.classlib.java.lang.util.TestServiceImpl \ No newline at end of file diff --git a/teavm-classlib/src/test/resources/META-INF/services/org.teavm.classlib.java.util.TestService b/teavm-classlib/src/test/resources/META-INF/services/org.teavm.classlib.java.util.TestService new file mode 100644 index 000000000..ab8162f22 --- /dev/null +++ b/teavm-classlib/src/test/resources/META-INF/services/org.teavm.classlib.java.util.TestService @@ -0,0 +1 @@ +org.teavm.classlib.java.util.TestServiceImpl \ No newline at end of file diff --git a/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java b/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java index 423ba478d..2c72e65e6 100644 --- a/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java +++ b/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java @@ -411,7 +411,15 @@ class DependencyGraphBuilder { } @Override - public void isInstance(VariableReader receiver, VariableReader value, ValueType type) { + public void isInstance(VariableReader receiver, VariableReader value, final ValueType type) { + if (type instanceof ValueType.Object) { + final String className = ((ValueType.Object)type).getClassName(); + useRunners.add(new Runnable() { + @Override public void run() { + dependencyChecker.initClass(className, callerStack); + } + }); + } } @Override