public ClassReference addClass(String qualifiedName) {

        if (qualifiedName.indexOf('.') < 0) {
            String element = qualifiedName;
            int arrayDepth = 0;
            while (JavaArrayType.isJavaArrayRepresentation(element)) {
                arrayDepth++;
                element = JavaArrayType.getElementJavaRepresentation(element);
            }

            final JavaType independent = JavaTypeFactory.getIndependentTypeFromJavaRepresentation(qualifiedName);
            if (independent != null && independent instanceof PrimitiveType) {
                ClassReference reference = getPrimitiveArrayClassReference((PrimitiveType) independent);

                if (reference != null) {
                    while (--arrayDepth > 0) {
                        reference = new ArrayClassReference(reference);
                    }

                    mClasses.add(reference);
                }

                return reference;
            }

            ClassReference elementResult = addNode(element, mClasses, addClassLambda, null);

            while (arrayDepth-- > 0) {
                elementResult = new ArrayClassReference(elementResult);
                mClasses.add(elementResult);
            }

            return elementResult;
        }
        else {
            return addNode(qualifiedName, mClasses, addClassLambda, null);
        }
    }