These two items seem to be at cross purposes. AbstractContextMapper has subclasses implement
The mapFromContext method is final, and returns Object.Code:protected abstract Object doMapFromContext(DirContextOperations ctx)
The ParameterizedContextMapper<T> interface includes
One cannot mix these two; the following declaration does not compile:Code:T mapFromContext(Object ctx)
Code:public class PersonContextMapper extends AbstractContextMapper implements ParameterizedContextMapper<Person>
Would it be possible to combine the ideas of these two items? Could there be a ParameterizedAbstractContextMapper<T>:
Code:public abstract class ParameterizedAbstractContextMapper<T> implements ParameterizedContextMapper<T> { public final T mapFromContext(Object obj) { return doMapFromContext((DirContextOperations) obj); } protected abstract T doMapFromContext(DirContextOperations ctx); }


Reply With Quote