@Test public void failsIfExceptionFactoryHasNoPublicConstructor() { try { VersionDescriptorLoader.forVersionList(MissingExceptionFactoryConstructor.class); fail(); } catch (IllegalArgumentException e) { } }
public static VersionDescriptorLoader forVersionList(Class<?> interfaceSpec) { try { return new VersionDescriptorLoader(interfaceSpec); } catch (IllegalAccessException | InstantiationException e) { throw new IllegalArgumentException("Failed to load versions for " + interfaceSpec, e); } }
VersionDescriptorLoader { public static VersionDescriptorLoader forVersionList(Class<?> interfaceSpec) { try { return new VersionDescriptorLoader(interfaceSpec); } catch (IllegalAccessException | InstantiationException e) { throw new IllegalArgumentException("Failed to load versions for " + interfaceSpec, e); } } }
VersionDescriptorLoader { public static VersionDescriptorLoader forVersionList(Class<?> interfaceSpec) { try { return new VersionDescriptorLoader(interfaceSpec); } catch (IllegalAccessException | InstantiationException e) { throw new IllegalArgumentException("Failed to load versions for " + interfaceSpec, e); } } private  VersionDescriptorLoader(Class<?> interfaceSpec); }
VersionDescriptorLoader { public static VersionDescriptorLoader forVersionList(Class<?> interfaceSpec) { try { return new VersionDescriptorLoader(interfaceSpec); } catch (IllegalAccessException | InstantiationException e) { throw new IllegalArgumentException("Failed to load versions for " + interfaceSpec, e); } } private  VersionDescriptorLoader(Class<?> interfaceSpec); static VersionDescriptorLoader forVersionList(Class<?> interfaceSpec); ImmutableSet<Version> getVersions(); }
VersionDescriptorLoader { public static VersionDescriptorLoader forVersionList(Class<?> interfaceSpec) { try { return new VersionDescriptorLoader(interfaceSpec); } catch (IllegalAccessException | InstantiationException e) { throw new IllegalArgumentException("Failed to load versions for " + interfaceSpec, e); } } private  VersionDescriptorLoader(Class<?> interfaceSpec); static VersionDescriptorLoader forVersionList(Class<?> interfaceSpec); ImmutableSet<Version> getVersions();  }