6.5.2 Reclassification of Contextually Ambiguous Names

An AmbiguousName is then reclassified as follows:

As an example, consider the following contrived "library code":


package ORG.rpgpoet;

import java.util.Random;
interface Music { Random[] wizards = new Random[4]; }

and then consider this example code in another package:


package bazola;


class Gabriel {
	static int n = ORG.rpgpoet.Music.wizards.length;
}

First of all, the name ORG.rpgpoet.Music.wizards.length is classified as an ExpressionName because it functions as a PostfixExpression. Therefore, each of the names:


ORG.rpgpoet.Music.wizards
ORG.rpgpoet.Music
ORG.rpgpoet
ORG

is initially classified as an AmbiguousName. These are then reclassified: