So I am trying to implement the guice Provider interface,
public interface Provider<T> {
T get();
}
and I have another interface called Creator
public interface Creator {
void create();
}
and I want to create a Provider to bind different types of Creator when creating a number of CreatePhases.
private static final class CreatePhaseProvider<T> implements Provider<CreatePhase<T extends Creator>>
{
@Override
public CreatePhase<T> get(){
return null;
}
}
This gives me an error “Syntax error on token “extends” ,,”. Any suggestions?
Oops put the extends in the wrong place!