protected Java.Rvalue generateGetInvocation(Class type, int index) throws CompileException { return new Java.MethodInvocation(loc, new Java.AmbiguousName(loc, new String[] {"unsafe"}), "get" + accessorForType(type), new Java.Rvalue[] { new Java.BinaryOperation(loc, new Java.AmbiguousName(loc, new String[] {"address"}), "+", new Java.IntegerLiteral(loc, Integer.toString(layout[index]))) } ); }
protected Java.Rvalue generateSetInvocation(Class type, int index, String value) throws CompileException { return new Java.MethodInvocation(loc, new Java.AmbiguousName(loc, new String[] {"unsafe"}), "put" + accessorForType(type), new Java.Rvalue[]{ new Java.BinaryOperation(loc, new Java.AmbiguousName(loc, new String[]{"address"}), "+", new Java.IntegerLiteral(loc, Integer.toString(layout[index]))), new Java.Cast(loc, classToRefType(type), new Java.AmbiguousName(loc, new String[] {value})) } ); }