@Test public void _enum() throws Exception { Configurator<Node.Mode> c = registry.lookupOrFail(Node.Mode.class); final Node.Mode value = c.configure(new Scalar("NORMAL"), context); assertEquals(Node.Mode.NORMAL, value); }
@NonNull @Override public Object configure(CNode config, ConfigurationContext context) throws ConfiguratorException { return Stapler.lookupConverter(target).convert(target, context.getSecretSourceResolver().resolve(config.asScalar().toString())); }
PrimitiveConfigurator implements Configurator { @NonNull @Override public Object configure(CNode config, ConfigurationContext context) throws ConfiguratorException { return Stapler.lookupConverter(target).convert(target, context.getSecretSourceResolver().resolve(config.asScalar().toString())); } }
PrimitiveConfigurator implements Configurator { @NonNull @Override public Object configure(CNode config, ConfigurationContext context) throws ConfiguratorException { return Stapler.lookupConverter(target).convert(target, context.getSecretSourceResolver().resolve(config.asScalar().toString())); } PrimitiveConfigurator(Class clazz); }
PrimitiveConfigurator implements Configurator { @NonNull @Override public Object configure(CNode config, ConfigurationContext context) throws ConfiguratorException { return Stapler.lookupConverter(target).convert(target, context.getSecretSourceResolver().resolve(config.asScalar().toString())); } PrimitiveConfigurator(Class clazz); @Override Class getTarget(); @NonNull @Override Set<Attribute> describe(); @NonNull @Override Object configure(CNode config, ConfigurationContext context); @Override Object check(CNode config, ConfigurationContext context); @CheckForNull @Override CNode describe(Object instance, ConfigurationContext context); @NonNull @Override List<Configurator> getConfigurators(ConfigurationContext context); }
PrimitiveConfigurator implements Configurator { @NonNull @Override public Object configure(CNode config, ConfigurationContext context) throws ConfiguratorException { return Stapler.lookupConverter(target).convert(target, context.getSecretSourceResolver().resolve(config.asScalar().toString())); } PrimitiveConfigurator(Class clazz); @Override Class getTarget(); @NonNull @Override Set<Attribute> describe(); @NonNull @Override Object configure(CNode config, ConfigurationContext context); @Override Object check(CNode config, ConfigurationContext context); @CheckForNull @Override CNode describe(Object instance, ConfigurationContext context); @NonNull @Override List<Configurator> getConfigurators(ConfigurationContext context);  }