function "toJava" { param "type"; choose { when "$type='bool'" > Boolean when "$type='int'" > int when "$type='string' or $type='sstring'" > String when "$type='timestamp'" > Date when "$type='void'" > void when "$type='identity'" > Identity when "$type='message'" > Message when "$type='bloblist'" > Vector when "$type='identitylist'" > Vector when "$type='stringlist'" > Vector when "$type='stringpairlist'" > ArrayList> when "$type='bytearray'" > byte[] when "$type='Color'" > Color when "$type='DecryptFlags'" > DecryptFlags when "$type='EncFormat'" > Message.EncFormat when "$type='Rating'" > Rating otherwise call "CamelCase" with "text", "$type"; } } function "toSig" { param "type"; choose { when "$type='string'" error | # cannot declare "string" when "$type='bool'" > Z when "$type='bytearray'" > [b otherwise { > L choose { when "$type='timestamp'" > java/util/Date when "$type='int'" > java/lang/Integer when "$type='identity'" > foundation/pEp/jniadapter/_Identity when "$type='message'" > foundation/pEp/jniadapter/Message when "$type='bloblist'" > java/util/Vector when "$type='identitylist'" > java/util/Vector when "$type='stringlist'" > java/util/Vector when "$type='stringpairlist'" > java/util/ArrayList when "$type='Color'" > foundation/pEp/jniadapter/Color when "$type='DecryptFlags'" > foundation/pEp/jniadapter/DecryptFlags when "$type='EncFormat'" > foundation/pEp/jniadapter/Message/EncFormat when "$type='Rating'" > foundation/pEp/jniadapter/Rating otherwise error | # cannot declare "«$type»" } > ; } } } function "toIntermediate" { param "type"; param "dir"; choose { when "$type='bool'" > boolean when "$type='int'" > int when "$type='string' or $type='sstring'" > byte[] when "$type='bytearray' or $type='sstring'" > byte[] when "$type='bloblist'" > Vector<_Blob> when "$type='identity'" > _Identity when "$type='identitylist'" > Vector<_Identity> when "$type='stringlist'" > Vector when "$type='stringpairlist'" > ArrayList> otherwise call "toJava" with "type", "$type"; } } define operator "†([$@]?[a-zA-Z0-9_]+)" as call "toJava" with "type", "%1"; define operator "¡([$@]?[a-zA-Z0-9_]+)" as call "toIntermediate" with "type", "%1";