Skip to content

Commit 3e22dd6

Browse files
committed
Refactor: remove redundant package prefixes in algorithm type mappings for improved readability
1 parent e009506 commit 3e22dd6

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

  • core/src/main/kotlin/org/evomaster/core

core/src/main/kotlin/org/evomaster/core/Main.kt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,14 @@ class Main {
688688
Key.get(object : TypeLiteral<StandardGeneticAlgorithm<GraphQLIndividual>>() {})
689689

690690
EMConfig.Algorithm.LIPS ->
691-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.LIPSAlgorithm<GraphQLIndividual>>() {})
691+
Key.get(object : TypeLiteral<LIPSAlgorithm<GraphQLIndividual>>() {})
692+
692693
EMConfig.Algorithm.MuPlusLambdaEA ->
693694
Key.get(object : TypeLiteral<MuPlusLambdaEvolutionaryAlgorithm<GraphQLIndividual>>() {})
694695

695696
EMConfig.Algorithm.MuLambdaEA ->
696-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.MuLambdaEvolutionaryAlgorithm<GraphQLIndividual>>(){})
697+
Key.get(object : TypeLiteral<MuLambdaEvolutionaryAlgorithm<GraphQLIndividual>>(){})
698+
697699
EMConfig.Algorithm.BreederGA ->
698700
Key.get(object : TypeLiteral<BreederGeneticAlgorithm<GraphQLIndividual>>() {})
699701

@@ -728,13 +730,14 @@ class Main {
728730

729731
EMConfig.Algorithm.RW ->
730732
Key.get(object : TypeLiteral<RandomWalkAlgorithm<RPCIndividual>>() {})
733+
731734
EMConfig.Algorithm.LIPS ->
732-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.LIPSAlgorithm<RPCIndividual>>() {})
735+
Key.get(object : TypeLiteral<LIPSAlgorithm<RPCIndividual>>() {})
733736

734737
EMConfig.Algorithm.MuPlusLambdaEA ->
735738
Key.get(object : TypeLiteral<MuPlusLambdaEvolutionaryAlgorithm<RPCIndividual>>() {})
736739
EMConfig.Algorithm.MuLambdaEA ->
737-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.MuLambdaEvolutionaryAlgorithm<RPCIndividual>>(){})
740+
Key.get(object : TypeLiteral<MuLambdaEvolutionaryAlgorithm<RPCIndividual>>(){})
738741

739742
EMConfig.Algorithm.BreederGA ->
740743
Key.get(object : TypeLiteral<BreederGeneticAlgorithm<RPCIndividual>>() {})
@@ -744,6 +747,7 @@ class Main {
744747

745748
EMConfig.Algorithm.OnePlusLambdaLambdaGA ->
746749
Key.get(object : TypeLiteral<OnePlusLambdaLambdaGeneticAlgorithm<RPCIndividual>>() {})
750+
747751
else -> throw IllegalStateException("Unrecognized algorithm ${config.algorithm}")
748752
}
749753
}
@@ -768,13 +772,15 @@ class Main {
768772

769773
EMConfig.Algorithm.RW ->
770774
Key.get(object : TypeLiteral<RandomWalkAlgorithm<WebIndividual>>() {})
775+
771776
EMConfig.Algorithm.LIPS ->
772-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.LIPSAlgorithm<WebIndividual>>() {})
777+
Key.get(object : TypeLiteral<LIPSAlgorithm<WebIndividual>>() {})
773778

774779
EMConfig.Algorithm.MuPlusLambdaEA ->
775780
Key.get(object : TypeLiteral<MuPlusLambdaEvolutionaryAlgorithm<WebIndividual>>() {})
781+
776782
EMConfig.Algorithm.MuLambdaEA ->
777-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.MuLambdaEvolutionaryAlgorithm<WebIndividual>>(){})
783+
Key.get(object : TypeLiteral<MuLambdaEvolutionaryAlgorithm<WebIndividual>>(){})
778784

779785
EMConfig.Algorithm.BreederGA ->
780786
Key.get(object : TypeLiteral<BreederGeneticAlgorithm<WebIndividual>>() {})
@@ -784,6 +790,7 @@ class Main {
784790

785791
EMConfig.Algorithm.OnePlusLambdaLambdaGA ->
786792
Key.get(object : TypeLiteral<OnePlusLambdaLambdaGeneticAlgorithm<WebIndividual>>() {})
793+
787794
else -> throw IllegalStateException("Unrecognized algorithm ${config.algorithm}")
788795
}
789796
}
@@ -817,12 +824,15 @@ class Main {
817824

818825
EMConfig.Algorithm.RW ->
819826
Key.get(object : TypeLiteral<RandomWalkAlgorithm<RestIndividual>>() {})
827+
820828
EMConfig.Algorithm.LIPS ->
821-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.LIPSAlgorithm<RestIndividual>>() {})
829+
Key.get(object : TypeLiteral<LIPSAlgorithm<RestIndividual>>() {})
830+
822831
EMConfig.Algorithm.MuPlusLambdaEA ->
823832
Key.get(object : TypeLiteral<MuPlusLambdaEvolutionaryAlgorithm<RestIndividual>>() {})
833+
824834
EMConfig.Algorithm.MuLambdaEA ->
825-
Key.get(object : TypeLiteral<org.evomaster.core.search.algorithms.MuLambdaEvolutionaryAlgorithm<RestIndividual>>(){})
835+
Key.get(object : TypeLiteral<MuLambdaEvolutionaryAlgorithm<RestIndividual>>(){})
826836

827837
EMConfig.Algorithm.BreederGA ->
828838
Key.get(object : TypeLiteral<BreederGeneticAlgorithm<RestIndividual>>() {})

0 commit comments

Comments
 (0)