Modifier and type | Action and description |
---|---|
static C | createSkillDelegator(Skill,Class<T>,AgentTrait) Create a delegator for the given skill. |
static C | createSkillDelegatorIfPossible(Skill,Class<T>,AgentTrait) Create a delegator for the given skill when it is possible. |
static AgentTrait | getCaller Replies the caller of the capacity functions. |
def createSkillDelegator(Skill,Class<T>,AgentTrait) : Cwith C extends Capacity
throws java.lang.Exception
capacity
.
This function fails if the delegator instance cannot be created due to inner type not found, invalid constructor signature, run-time exception when creating the instance. This functions assumes that the name of the definition type is the same as Capacity.ContextAwareCapacityWrapper, and this definition extends the delegator definition of the first super type of the capacity
, and implements all the super types of the capacity
. The expected constructor for this inner type has the same signature as the one of Capacity.ContextAwareCapacityWrapper.
The function createSkillDelegatorIfPossible(Skill, Class, AgentTrait) is a similar function than this function, except that it does not fail when the delegator instance cannot be created. In this last case, the function createSkillDelegatorIfPossible(Skill, Class, AgentTrait) reply the original skill itself.
def createSkillDelegatorIfPossible(Skill,Class<T>,AgentTrait) : Cwith C extends Capacity
throws java.lang.ClassCastException
capacity
.
This functions assumes that the name of the definition type is the same as Capacity.ContextAwareCapacityWrapper, and this definition extends the delegator definition of the first super type of the capacity
, and implements all the super types of the capacity
. The expected constructor for this inner type has the same signature as the one of Capacity.ContextAwareCapacityWrapper. If the delegator instance cannot be created due to to inner type not found, invalid constructor signature, run-time exception when creating the instance, this function replies the original skill.
The function createSkillDelegator(Skill, Class, AgentTrait) is a similar function than this function, except that it fails when the delegator instance cannot be created.
def getCaller : AgentTrait