private String getNameForType ( Class < ? > type ) { if ( _typeToStringMap . containsKey ( type ) ) { return _typeToStringMap . get ( type ) ; } for ( Entry < String , Class < ? > > entry : _typeMappings . entrySet ( ) ) { if ( entry . getValue ( ) . isAssignableFrom ( type ) ) { return entry . getKey ( ) ; } } return null ; }
given a type get a name . This takes subclassing into consideration . For now this will return the first subclass match to the type not the closest