@Test public void mustGetClassInformationForRunnableFuture() { ClassInformation info = repo.getInformation("java/util/concurrent/RunnableFuture"); assertEquals("java/lang/Object", info.getSuperClassName()); assertEquals(2, info.getInterfaces().size()); assertTrue(info.getInterfaces().contains("java/lang/Runnable")); assertTrue(info.getInterfaces().contains("java/util/concurrent/Future")); assertTrue(info.isInterface()); }
@Override public ClassInformation getInformation(String internalClassName) { Validate.notNull(internalClassName); try (InputStream is = classLoader.getResourceAsStream(internalClassName + ".class")) { if (is == null) { return null; } return InternalUtils.getClassInformation(is); } catch (IOException ioe) { throw new IllegalStateException(ioe); } }
ClassResourceClassInformationRepository implements ClassInformationRepository { @Override public ClassInformation getInformation(String internalClassName) { Validate.notNull(internalClassName); try (InputStream is = classLoader.getResourceAsStream(internalClassName + ".class")) { if (is == null) { return null; } return InternalUtils.getClassInformation(is); } catch (IOException ioe) { throw new IllegalStateException(ioe); } } }
ClassResourceClassInformationRepository implements ClassInformationRepository { @Override public ClassInformation getInformation(String internalClassName) { Validate.notNull(internalClassName); try (InputStream is = classLoader.getResourceAsStream(internalClassName + ".class")) { if (is == null) { return null; } return InternalUtils.getClassInformation(is); } catch (IOException ioe) { throw new IllegalStateException(ioe); } } ClassResourceClassInformationRepository(ClassLoader classLoader); }
ClassResourceClassInformationRepository implements ClassInformationRepository { @Override public ClassInformation getInformation(String internalClassName) { Validate.notNull(internalClassName); try (InputStream is = classLoader.getResourceAsStream(internalClassName + ".class")) { if (is == null) { return null; } return InternalUtils.getClassInformation(is); } catch (IOException ioe) { throw new IllegalStateException(ioe); } } ClassResourceClassInformationRepository(ClassLoader classLoader); @Override ClassInformation getInformation(String internalClassName); }
ClassResourceClassInformationRepository implements ClassInformationRepository { @Override public ClassInformation getInformation(String internalClassName) { Validate.notNull(internalClassName); try (InputStream is = classLoader.getResourceAsStream(internalClassName + ".class")) { if (is == null) { return null; } return InternalUtils.getClassInformation(is); } catch (IOException ioe) { throw new IllegalStateException(ioe); } } ClassResourceClassInformationRepository(ClassLoader classLoader); @Override ClassInformation getInformation(String internalClassName);  }