@Test public void _Integer() throws Exception { Configurator c = registry.lookupOrFail(Integer.class); final Object value = c.configure(new Scalar("123"), context); assertEquals(123, (int) 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);  }