Reflection is used in combination with InternalTask to determine the type of task. This could be solved by including all relevant operations in the same interface or by requesting the interface that is needed, e.g. asReadWriteTask(), as ReadOnlyTask() etc. The task type must then be available (getTaskType()), so that an implementation can throw UnsupportedOperationException if the task isn't of the requested type.
Reflection is used in combination with InternalTask to determine the type of task. This could be solved by including all relevant operations in the same interface or by requesting the interface that is needed, e.g. asReadWriteTask(), as ReadOnlyTask() etc. The task type must then be available (getTaskType()), so that an implementation can throw UnsupportedOperationException if the task isn't of the requested type.
See also #15