Browse Source

Message class eliminate public native methods, More comments generated

JNI-106
heck 5 years ago
parent
commit
7cc5ca7c32
  1. 23
      src/gen_java_Message.ysl2

23
src/gen_java_Message.ysl2

@ -134,6 +134,7 @@ tstylesheet {
choose { choose {
when "$ctype = 'identity'" { when "$ctype = 'identity'" {
|| ||
// Property type: Identity. [java: «$type», intermediate: «$itype», ctype: «$ctype»]
public «$type» get«$name»() { public «$type» get«$name»() {
«$itype» res = _get«$name»(); «$itype» res = _get«$name»();
if (res != null) { if (res != null) {
@ -175,6 +176,7 @@ tstylesheet {
otherwise > new _«$ename»(i) otherwise > new _«$ename»(i)
} }
|| ||
// Property type: list type. [java: «$type», intermediate: «$itype», ctype: «$ctype»]
public «$type» get«$name»() { public «$type» get«$name»() {
«$itype» glist = _get«$name»(); «$itype» glist = _get«$name»();
if (glist != null) { if (glist != null) {
@ -207,6 +209,7 @@ tstylesheet {
when "$itype != $type" { when "$itype != $type" {
|| ||
// Property type: differs from intermediate. [java: «$type», intermediate: «$itype», ctype: «$ctype»]
public «$type» get«$name»() { public «$type» get«$name»() {
«$itype» res = _get«$name»(); «$itype» res = _get«$name»();
if (res != null) { if (res != null) {
@ -232,11 +235,12 @@ tstylesheet {
when "../enum[@name=$ctype]" { when "../enum[@name=$ctype]" {
|| ||
public «$itype» get«$name»() { // Property type: enum type. [java: «$type», intermediate: «$itype», ctype: «$ctype»]
return «$itype».getByInt(_get«$name»()); public «$type» get«$name»() {
return «$type».getByInt(_get«$name»());
} }
private native int _get«$name»(); private native int _get«$name»();
public void set«$name»(«$itype» value) { public void set«$name»(«$type» value) {
if(value != null) if(value != null)
_set«$name»(value.value); _set«$name»(value.value);
else else
@ -249,8 +253,17 @@ tstylesheet {
otherwise { otherwise {
|| ||
public native «$itype» get«$name»(); // Property type: no intermediate type [java: «$type», intermediate: «$itype», ctype: «$ctype»]
public native void set«$name»(«$itype» value); public «$type» get«$name»() {
return get«$name»();
}
private native «$type» _get«$name»();
public void set«$name»(«$type» value) {
_set«$name»(value);
}
private native void _set«$name»(«$type» value);
|| ||
} }

Loading…
Cancel
Save