Browse Source

Add the Enum default method getInternalStringValue() when "has_int_str_val" is set (TODO: Query this using XPath, fdik how do i do this? in ysl2?)

JNI-118
heck 5 years ago
parent
commit
29705b4756
  1. 13
      src/codegen/gen_java_Message.ysl2
  2. 2
      src/codegen/pEp.yml2

13
src/codegen/gen_java_Message.ysl2

@ -136,9 +136,20 @@ tstylesheet {
}
return null;
}
}
||
choose {
when "@has_int_str_val = 'true'" {
||
public String getInternalStringValue() {
return "Unimplemented";
}
||
}
}
||
}
||
}
function "exception" {

2
src/codegen/pEp.yml2

@ -24,7 +24,7 @@ namespace pEp {
};
enum Rating {
enum has_int_str_val=true Rating {
enumitem pEp_rating_undefined int_str_val=undefined toString="undefined" > 0
enumitem pEp_rating_cannot_decrypt int_str_val=cannot_decrypt toString="cannot decrypt" > 1
enumitem pEp_rating_have_no_key int_str_val=have_no_key toString="have no key" > 2

Loading…
Cancel
Save