Added minimal typeregistry for java 7