// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.lang.reflect.Field;

public class DirtyHack {
	public static void main(String[] args) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
		Direction d = Direction.West;
		Field f = d.getClass().getSuperclass().getDeclaredField("ordinal");
		f.setAccessible(true);
		int ix = (int)(Integer)f.get(d);
		System.out.println(ix);
		System.out.println(Direction.values()[ix]);
	}
}
