Annotation Type CanonicalName
- 
@Documented @Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER}) @SubtypeOf({FullyQualifiedName.class,CanonicalNameOrEmpty.class,CanonicalNameOrPrimitiveType.class}) public @interface CanonicalNameCanonical names have the same syntactic form asfully-qualified names. Every canonical name is a fully-qualified name, but not every fully-qualified name is a canonical name.JLS section 6.7 gives the following example:
The difference between a fully qualified name and a canonical name can be seen in code such as:
Given a character sequence that is a fully-qualified name, there is no way to know whether or not it is a canonical name, without examining the program it refers to. Type-checking determines that a string is a
Bothpackage p; class O1 { class I {} } class O2 extends O1 {}p.O1.Iandp.O2.Iare fully qualified names that denote the member classI, but onlyp.O1.Iis its canonical name.CanonicalNamebased on provenance (what method produced the string), rather than the contents of the string.- See Also:
 FullyQualifiedName- See the Checker Framework Manual:
 - Signature Checker