// Now, either sc is the last element of the list, or
// it has type arguments (or both)
assert (!(iter.hasNext()) || (sc.getTypeArguments().length > 0));
// Create the raw type
TypeReference c = getFactory().makeNamedType(n.toString());
// if there are no type arguments
if (sc.getTypeArguments().length == 0) {
//we have surely reached the end of the path
assert (!iter.hasNext());
resultType = c; // the result is the raw type
}
else {
assert (sc.getTypeArguments().length > 0);
// otherwise, we have type arguments, so we create a parameterized
// type, whose declaration is the raw type c, and whose owner is
// the declaring class of c (if any). This latter fact is indicated
// by passing null as the owner.
// First, we reify the type arguments
TypeReference[] pts = reifyTypeArguments(sc.getTypeArguments());
TypeReference owner = getFactory().makeParameterizedType(c, null, pts);
// phase 2: iterate over remaining simple class types
while (iter.hasNext()) {
sc = iter.next();
dollar = sc.useDollar();
n.append(dollar ? "$" : ".").append(sc.getName()); // build up raw class name