Add toBaseType, isBasicType and hasNext to class Type. Make Type abstract and let 'nextOf' return null. Add TypeBasic for BasicTypes.