diff --git a/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java b/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java index f14c883666..7bf5ad2381 100644 --- a/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java +++ b/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java @@ -127,6 +127,19 @@ public static S castInternalSkillReference(Agent agent, return agent.$castSkill(type, reference); } + /** Set the internal skill of an agent. + * + * @param agent the agent. + * @param skill the skill instance to attach to the agent. + * @param capacities the list of implemented capacities. This array cannot be {@code null}. + * @return the reference to the skill. + * @since 0.10 + */ + public static ClearableReference setInternalSkill(Agent agent, Skill skill, Class[] capacities) { + assert capacities != null; + return agent.$setSkill(skill, capacities); + } + /** Replies the internal skill of an agent. * * @param the type of the capacity.