if (((JCTypeApply)frame).clazz == tree) {
// generic: RAW; noop
} else if (((JCTypeApply)frame).arguments.contains(tree)) {
JCTypeApply taframe = (JCTypeApply) frame;
int arg = taframe.arguments.indexOf(tree);
p.location = p.location.prepend(new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg));
Type typeToUse;
if (newPath.tail != null && newPath.tail.head.hasTag(Tag.NEWCLASS)) {
// If we are within an anonymous class instantiation, use its type,
// because it contains a correctly nested type.