Browse Source

CodeGen ysl2 formatting only (i like brackets)

JNI-106
heck 5 years ago
parent
commit
931cf1a1c3
  1. 22
      src/gen_java_Message.ysl2

22
src/gen_java_Message.ysl2

@ -38,7 +38,7 @@ tstylesheet {
handle = _«$cname»(_mime_text);
}
public native byte[] _encodeMIME() throws pEpException;
private native byte[] _encodeMIME() throws pEpException;
public String encodeMIME() {
return Utils.toUTF16(_encodeMIME());
@ -126,7 +126,7 @@ tstylesheet {
const "name" call "toJava" with "type", "name(*[position()=1])";
choose {
when "$ctype = 'identity'"
when "$ctype = 'identity'" {
||
private native «$itype» _get«$name»();
private native void _set«$name»(«$itype» value);
@ -146,10 +146,8 @@ tstylesheet {
}
||
when "$ctype = 'identitylist' or $ctype = 'bloblist' or $ctype = 'stringlist' or $ctype = 'stringpairlist'"
{
}
when "$ctype = 'identitylist' or $ctype = 'bloblist' or $ctype = 'stringlist' or $ctype = 'stringpairlist'" {
const "ename", "substring-after(substring($type,1,string-length($type)-1), '<')";
const "iename" choose {
when "$ctype = 'stringlist'" > byte[]
@ -193,7 +191,7 @@ tstylesheet {
||
}
when "$itype != $type"
when "$itype != $type" {
||
private native «$itype» _get«$name»();
private native void _set«$name»(«$itype» value);
@ -212,8 +210,9 @@ tstylesheet {
}
||
}
when "$itype != $type"
when "$itype != $type" {
||
private native «$itype» _get«$name»();
private native void _set«$name»(«$itype» value);
@ -232,8 +231,9 @@ tstylesheet {
}
||
}
when "../enum[@name=$ctype]"
when "../enum[@name=$ctype]" {
||
private native int _get«$name»();
public «$itype» get«$name»() {
@ -248,8 +248,9 @@ tstylesheet {
}
||
}
otherwise
otherwise {
||
public native «$itype» get«$name»();
public native void set«$name»(«$itype» value);
@ -257,6 +258,7 @@ tstylesheet {
||
}
}
}
template "*", mode=interface {
const "ctype", "name(.)";

Loading…
Cancel
Save