DescribableModel implements Serializable { public Map<String,Object> uninstantiate(T o) throws UnsupportedOperationException { return uninstantiate2(o).toMap(); } 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 uninstantiate() throws Exception { assertEquals("{flag=true, text=stuff}", DescribableModel.uninstantiate_(new C("stuff", true)).toString()); I i = new I("stuff"); i.setFlag(true); i.text = "more"; assertEquals("{flag=true, text=more, value=stuff}", DescribableModel.uninstantiate_(i).toString()); Object net = new Internet(); UninstantiatedDescribable ud = UninstantiatedDescribable.from(net); assertEquals("net",ud.getSymbol()); assertTrue(ud.getArguments().isEmpty()); assertTrue(ud.instantiate(Tech.class) instanceof Internet); }