If no namespace used do not try to concatenate the namespace

If using ClassGenerator for non namespace classes no methods are found inside classes, as the classname check fails always.