Techniques for generation of Java macro instructions suitable for use in Java computing environments are disclosed. The permanent magnets M1a, M1b, M2a, M2b each of which is rectangular solid are fixed to the yoke 13 of the rotational angle displacement sensor 11. The electrical signal is processed to determine mobile element angular position.