Basic support for custom types

JAVA-61 #resolve