[forge-dev] [JBoss JIRA] Updated: (SEAMFORGE-88) Provide the ability to add @Option Converters for custom types
Lincoln Baxter III (JIRA)
jira-events at lists.jboss.org
Wed Mar 23 11:58:45 EDT 2011
[ https://issues.jboss.org/browse/SEAMFORGE-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lincoln Baxter III updated SEAMFORGE-88:
----------------------------------------
Description:
This process should be encapsulated with a Forge interface API, adapter, and ServiceLoader for extension.
{code}
void init(@Observes final Startup event, final PluginCommandCompleter pluginCompleter) throws Exception
{
BooleanConverter booleanConverter = new BooleanConverter();
addConversionHandler(boolean.class, booleanConverter);
addConversionHandler(Boolean.class, booleanConverter);
addConversionHandler(File.class, new FileConverter());
addConversionHandler(Dependency.class, new DependencyIdConverter());
addConversionHandler(URL.class, new URLConverter());
...
}
public interface OptionValueConverter<T> {
public boolean supports(Class<?> type);
public T convert(Object value);
}
{code}
This interface should support injection.
was:
This process should be encapsulated with a Forge interface API, adapter, and ServiceLoader for extension.
<pre>
void init(@Observes final Startup event, final PluginCommandCompleter pluginCompleter) throws Exception
{
BooleanConverter booleanConverter = new BooleanConverter();
addConversionHandler(boolean.class, booleanConverter);
addConversionHandler(Boolean.class, booleanConverter);
addConversionHandler(File.class, new FileConverter());
addConversionHandler(Dependency.class, new DependencyIdConverter());
addConversionHandler(URL.class, new URLConverter());
...
}
public interface OptionValueConverter<T> {
public boolean supports(Class<?> type);
public T convert(Object value);
}
</pre>
This interface should support injection.
> Provide the ability to add @Option Converters for custom types
> --------------------------------------------------------------
>
> Key: SEAMFORGE-88
> URL: https://issues.jboss.org/browse/SEAMFORGE-88
> Project: Seam Forge
> Issue Type: Enhancement
> Components: Plugin API, Shell
> Affects Versions: 1.0.0.Alpha2
> Reporter: Lincoln Baxter III
>
> This process should be encapsulated with a Forge interface API, adapter, and ServiceLoader for extension.
> {code}
> void init(@Observes final Startup event, final PluginCommandCompleter pluginCompleter) throws Exception
> {
> BooleanConverter booleanConverter = new BooleanConverter();
> addConversionHandler(boolean.class, booleanConverter);
> addConversionHandler(Boolean.class, booleanConverter);
> addConversionHandler(File.class, new FileConverter());
> addConversionHandler(Dependency.class, new DependencyIdConverter());
> addConversionHandler(URL.class, new URLConverter());
> ...
> }
> public interface OptionValueConverter<T> {
> public boolean supports(Class<?> type);
> public T convert(Object value);
> }
> {code}
> This interface should support injection.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the forge-dev
mailing list