@ Pure public static < C extends Capacity > C createSkillDelegatorIfPossible ( Skill originalSkill , Class < C > capacity , AgentTrait capacityCaller ) throws ClassCastException { try { return Capacities . createSkillDelegator ( originalSkill , capacity , capacityCaller ) ; } catch ( Exception e ) { return capacity . cast ( originalSkill ) ; } }
Create a delegator for the given skill when it is possible .