@ Pure public static < C extends Capacity > C createSkillDelegator ( Skill originalSkill , Class < C > capacity , AgentTrait capacityCaller ) throws Exception { final String name = capacity . getName ( ) + CAPACITY_WRAPPER_NAME ; final Class < ? > type = Class . forName ( name , true , capacity . getClassLoader ( ) ) ; final Constructor < ? > cons = type . getDeclaredConstructor ( capacity , AgentTrait . class ) ; return capacity . cast ( cons . newInstance ( originalSkill , capacityCaller ) ) ; }
Create a delegator for the given skill .