Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

インターフェースの切り替えがめんどくさい #654

Open
YoshikiHigo opened this issue Sep 9, 2019 · 0 comments
Open

インターフェースの切り替えがめんどくさい #654

YoshikiHigo opened this issue Sep 9, 2019 · 0 comments

Comments

@YoshikiHigo
Copy link
Member

アノテーションを使ってインターフェースの実装を切り替える.

インタフェースの切り替え方法

これまでのIF実装 + カスタムアノテーションでどうか?

@kgp(type = "mutation",
     name = "HeuristicMutation",
     description = "...",
     author = "junnnnnnnnnnnnosuke")
public class HeuristicMutation implements Mutation {
  ...
}

上記の実装をClasspathに設置しておいて,それをクラスロードするように変えておいて,ユーザが起動時に指定する.

$ java -jar kgp.jar --mutation=HeuristicMutation ...

$ java -jar kgp.jar list-mutation
HeuristicMutation
DefaultMutation
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant