I have a Builder object that generates objects with generic methods like
this -

public class Builder
{
    public static <K, V> Column<K, V> newColumn(K name, V value, long
tstamp) {
        return new ColumnImpl<K, V>(name, value, tstamp);
    }
}

ie, it's akin to Guava's Maps/Lists classes. I'd like the impl classes
to be provided by Guice, eg

public class Builder
{
    private static Injector theInjector = Guice.createInjector(new
datagrid.api.module.Module());
    private static ColumnFactory theColumnFactory =
theInjector.getInstance(ColumnFactory.class);

    public static <K, V> Column<K, V> newColumn(K name, V value, long
tstamp) {
        return theColumnFactory.create(name, value, long);
    }
}

Am I right in saying Guice doesn't supporting binding generic methods
currently even with TypeLiteral/FactoryProvider tricks? 

Bill

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to