@MJI public int decode___3BII___3C( MJIEnv env, int clsObjRef, int bref, int off, int len, FeatureExpr ctx) { int cref = env.newCharArray(ctx, len); for (int i = 0, j = off; i < len; i++, j++) { env.setCharArrayElement( ctx, cref, i, env.getByteArrayElement(bref, j) .map( new Function<Byte, Character>() { @Override public Character apply(Byte b) { return (char) b.byteValue(); } })); } return cref; }
// we skip the AbstractStringBuilder ctor here, which is a bit dangerous // This is only justified because StringBuilders are used everywhere (implicitly) @MJI public void $init____V(MJIEnv env, int objref, FeatureExpr ctx) { int aref = env.newCharArray(ctx, 16); env.setReferenceField(ctx, objref, "value", aref); }