DescribableModel implements Serializable { static Set<Class<?>> findSubtypes(Class<?> supertype) { Set<Class<?>> clazzes = new HashSet<Class<?>>(); for (Descriptor<?> d : ExtensionList.lookup(Descriptor.class)) { if (supertype.isAssignableFrom(d.clazz)) { clazzes.add(d.clazz); } } if (supertype == ParameterValue.class) { for (Class<?> d : findSubtypes(ParameterDefinition.class)) { Class<?> c = parameterValueClass(d); if (c != null) { clazzes.add(c); } } } return clazzes; } DescribableModel(Class<T> clazz); static DescribableModel<T> of(Class<T> clazz); Class<T> getType(); Collection<DescribableParameter> getParameters(); DescribableParameter getParameter(String name); boolean hasSingleRequiredParameter(); @CheckForNull DescribableParameter getSoleRequiredParameter(); @CheckForNull DescribableParameter getFirstRequiredParameter(); String getDisplayName(); @Deprecated T instantiate(Map<String,?> arguments); T instantiate(Map<String,?> arguments, @CheckForNull TaskListener listener); Map<String,Object> uninstantiate(T o); UninstantiatedDescribable uninstantiate2(T o); static Map<String,Object> uninstantiate_(Object o); @SuppressWarnings("unchecked") static UninstantiatedDescribable uninstantiate2_(Object o); boolean isDeprecated(); @CheckForNull String getHelp(); @Override String toString(); @SuppressFBWarnings("MS_SHOULD_BE_FINAL") // Used to control warnings that instantiate parameters will be ignored
    @Restricted(NoExternalUse.class)
    static boolean STRICT_PARAMETER_CHECKING; static final String CLAZZ; }
@Test public void findSubtypes() throws Exception { assertEquals(new HashSet<Class<?>>(Arrays.asList(Impl1.class, Impl2.class, Impl3.class, Impl4.class)), DescribableModel.findSubtypes(Base.class)); assertEquals(Collections.singleton(Impl1.class), DescribableModel.findSubtypes(Marker.class)); }