
6 changed files with 73 additions and 20 deletions
@ -0,0 +1,32 @@ |
|||||
|
include yslt.yml2 |
||||
|
|
||||
|
tstylesheet { |
||||
|
include ./types_java.ysl2 |
||||
|
|
||||
|
template "/" |
||||
|
|| |
||||
|
package org.pEp.jniadapter; |
||||
|
|
||||
|
final public class Engine extends AbstractEngine { |
||||
|
public Engine() throws pEpException { } |
||||
|
|
||||
|
`` apply "namespace/interface/method"; |
||||
|
} |
||||
|
|| |
||||
|
|
||||
|
template "method" |
||||
|
|| |
||||
|
public native void «@name»( |
||||
|
`` apply "parm", 2 |
||||
|
) throws pEpException;`if "position()!=last()" > \n` |
||||
|
|| |
||||
|
|
||||
|
template "parm" { |
||||
|
const "dir", "name(*[1])"; |
||||
|
const "type", "name(*[2])"; |
||||
|
const "name", "name(*[3])"; |
||||
|
|
||||
|
| `call "toJava" with "type", "$type"` «translate($name,'-','_')»`if "position()!=last()" > ,` |
||||
|
} |
||||
|
} |
||||
|
|
@ -1,7 +0,0 @@ |
|||||
package org.pEp.jniadapter; |
|
||||
|
|
||||
public class Engine extends AbstractEngine { |
|
||||
public Engine() throws pEpException { |
|
||||
} |
|
||||
} |
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
include ./textutils.ysl2 |
||||
|
|
||||
|
function "toJava" { |
||||
|
param "type"; |
||||
|
|
||||
|
choose { |
||||
|
when "string" > String |
||||
|
when "stringlist" > String[] |
||||
|
otherwise call "CamelCase" with "text", "$type"; |
||||
|
} |
||||
|
} |
||||
|
|
Loading…
Reference in new issue