ologolo / streamline-api

Provides an API for managing file conversions
GNU Lesser General Public License v2.1
0 stars 1 forks source link

Stop depending on reflection in InternalTask and related #16

Closed joeha480 closed 6 years ago

joeha480 commented 6 years ago

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