You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would really like to break my options in several classes and combine them to get the end configuration:
public interface Interface1 {
@Option(name = "-param1", usage = "Paramter1") public void setParam1(String value);
}
public interface Interface2 {
@Option(name = "-param2", usage = "Paramter2") public void setParam2(String value);
}
public class Config implements Interface1,Interface2 {
public String param1;
public String param2;
public void setParam2(String value) {
param2 = value;
}
public void setParam1(String value) {
param1 = value;
}
However the is no way of using Config and an args4j configuration because @option annotation is not inherited in subclasses.
Marking @option with @inherited will enable that feature
The text was updated successfully, but these errors were encountered:
I have the same issue. Option annotations are not working through inherited config classes. Concretely it results in strange errors like "... is not a valid option", but it listed in usage print.
I think this is because the code runs recursively up on class hierarchy searching for annotations, but somehow thats handled in a wrong way. Probably @inherited on @option annotation declaration could solve this but I am not sure.
I would really like to break my options in several classes and combine them to get the end configuration:
However the is no way of using Config and an args4j configuration because @option annotation is not inherited in subclasses.
Marking @option with @inherited will enable that feature
The text was updated successfully, but these errors were encountered: