New type system implemented for java. Not 100% satisfied since java doesnt support switching on int64, but this will do, fornow.