Skip to content

Commit

Permalink
[all] Remove BuiltinCapacitiesProvider.
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Oct 1, 2020
1 parent 3447a14 commit 43d4bb4
Show file tree
Hide file tree
Showing 43 changed files with 0 additions and 1,816 deletions.
Expand Up @@ -21,8 +21,6 @@

package io.sarl.lang.core;

import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
import javax.inject.Inject;

Expand Down Expand Up @@ -52,34 +50,6 @@ public class Agent extends AbstractSkillContainer implements IBehaviorGuardEvalu

private final UUID parentID;

/**
* Creates a new agent with a parent <code>parentID</code> and initialize the built-in capacity
* with the given provider.
*
* @param provider the provider of built-in capacities for this agent. If {@code null}, the builtin
* capacities will not be initialized.
* @param parentID the agent's parent.
* @param agentID the identifier of the agent, or
* {@code null} for computing it randomly.
* @deprecated See {@link #Agent(UUID, UUID, DynamicSkillProvider)}.
*/
@Deprecated
@Inject
public Agent(
BuiltinCapacitiesProvider provider,
UUID parentID,
UUID agentID) {
this(parentID, agentID);
if (provider != null) {
final Map<Class<? extends Capacity>, Skill> builtinCapacities = provider.getBuiltinCapacities(this);
if (builtinCapacities != null && !builtinCapacities.isEmpty()) {
for (final Entry<Class<? extends Capacity>, Skill> bic : builtinCapacities.entrySet()) {
$setSkill(bic.getValue(), false, bic.getKey());
}
}
}
}

/**
* Creates a new agent with a parent <code>parentID</code> without initializing the built-in capacities.
*
Expand Down

This file was deleted.

Expand Up @@ -60,7 +60,6 @@ public void milliseconds() throws Exception {
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand All @@ -80,13 +79,6 @@ public void milliseconds() throws Exception {
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
" public A1(final UUID arg0, final UUID arg1, final DynamicSkillProvider arg2) {",
Expand Down Expand Up @@ -115,7 +107,6 @@ public void seconds() throws Exception {
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import io.sarl.lang.scoping.extensions.time.TimeExtensions;",
"import java.util.UUID;",
Expand All @@ -135,13 +126,6 @@ public void seconds() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand Down Expand Up @@ -171,7 +155,6 @@ public void minutes() throws Exception {
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import io.sarl.lang.scoping.extensions.time.TimeExtensions;",
"import java.util.UUID;",
Expand All @@ -191,13 +174,6 @@ public void minutes() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand Down Expand Up @@ -227,7 +203,6 @@ public void hours() throws Exception {
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import io.sarl.lang.scoping.extensions.time.TimeExtensions;",
"import java.util.UUID;",
Expand All @@ -248,13 +223,6 @@ public void hours() throws Exception {
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
" public A1(final UUID arg0, final UUID arg1, final DynamicSkillProvider arg2) {",
Expand Down Expand Up @@ -283,7 +251,6 @@ public void days() throws Exception {
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import io.sarl.lang.scoping.extensions.time.TimeExtensions;",
"import java.util.UUID;",
Expand All @@ -304,13 +271,6 @@ public void days() throws Exception {
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
" public A1(final UUID arg0, final UUID arg1, final DynamicSkillProvider arg2) {",
Expand Down Expand Up @@ -339,7 +299,6 @@ public void weeks() throws Exception {
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import io.sarl.lang.scoping.extensions.time.TimeExtensions;",
"import java.util.UUID;",
Expand All @@ -359,13 +318,6 @@ public void weeks() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand Down
Expand Up @@ -160,7 +160,6 @@ public void withSarlSyntaxWithLocalType() throws Exception {
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.AtomicSkillReference;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand Down Expand Up @@ -189,13 +188,6 @@ public void withSarlSyntaxWithLocalType() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand All @@ -218,7 +210,6 @@ public void withJavaSyntaxWithLocalType() throws Exception {
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.AtomicSkillReference;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand Down Expand Up @@ -247,13 +238,6 @@ public void withJavaSyntaxWithLocalType() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand All @@ -276,7 +260,6 @@ public void withSarlSyntaxWithJREType() throws Exception {
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.AtomicSkillReference;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand Down Expand Up @@ -305,13 +288,6 @@ public void withSarlSyntaxWithJREType() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand All @@ -338,7 +314,6 @@ public void withJavaSyntaxWithJREType() throws Exception {
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.AtomicSkillReference;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand Down Expand Up @@ -367,13 +342,6 @@ public void withJavaSyntaxWithJREType() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand All @@ -396,7 +364,6 @@ public void withSarlSyntaxWithoutType() throws Exception {
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.AtomicSkillReference;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand Down Expand Up @@ -425,13 +392,6 @@ public void withSarlSyntaxWithoutType() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand All @@ -458,7 +418,6 @@ public void withJavaSyntaxWithoutType() throws Exception {
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.AtomicSkillReference;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand Down Expand Up @@ -487,13 +446,6 @@ public void withJavaSyntaxWithoutType() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand Down
Expand Up @@ -87,7 +87,6 @@ public void compilation() throws Exception {
"import io.sarl.lang.annotation.SarlSpecification;",
"import io.sarl.lang.annotation.SyntheticMember;",
"import io.sarl.lang.core.Agent;",
"import io.sarl.lang.core.BuiltinCapacitiesProvider;",
"import io.sarl.lang.core.DynamicSkillProvider;",
"import java.util.UUID;",
"import javax.inject.Inject;",
Expand Down Expand Up @@ -133,13 +132,6 @@ public void compilation() throws Exception {
" public A1(final UUID arg0, final UUID arg1) {",
" super(arg0, arg1);",
" }",
" ",
" @SyntheticMember",
" @Deprecated",
" @Inject",
" public A1(final BuiltinCapacitiesProvider arg0, final UUID arg1, final UUID arg2) {",
" super(arg0, arg1, arg2);",
" }",
" ",
" @SyntheticMember",
" @Inject",
Expand Down

0 comments on commit 43d4bb4

Please sign in to comment.