I have a lot of "form" classes all of which extend Form. I have an abstract class called FormService and specific form services that extend this class. What I want to do is have an abstract method called populate() which takes a type of form thus calling the correct service for the given type through inheritance.
So I have something like:
public abstract FormService {
public abstract void populate(Form form);
}
public TestFormService extends FormService {
public void populate(TestForm form) {
//populate
}
Where TestForm is a type that extends Form. Is this possible because I can't seem to get the affect I want.