You can make this class extend AbstractBehavior<DSAPlane> (notice the generic specification). Then you will be able to remove this getAgent() method.