All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.checkerframework.checker.signature.qual.CanonicalName Maven / Gradle / Ivy

Go to download

The Checker Framework enhances Java's type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

There is a newer version: 3.44.0
Show newest version
package org.checkerframework.checker.signature.qual;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.checkerframework.framework.qual.SubtypeOf;

/**
 * Canonical names have the same syntactic form as {@link FullyQualifiedName fully-qualified name}s.
 * 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: * *
{@code
 * package p;
 * class O1 { class I {} }
 * class O2 extends O1 {}
 * }
* * Both {@code p.O1.I} and {@code p.O2.I} are fully qualified names that denote the member class * {@code I}, but only {@code p.O1.I} is its canonical name. * *
* * 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 {@code CanonicalName} based on provenance (what method produced the string), rather * than the contents of the string. * * @see FullyQualifiedName * @checker_framework.manual #signature-checker Signature Checker */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) @SubtypeOf({ FullyQualifiedName.class, CanonicalNameOrEmpty.class, CanonicalNameOrPrimitiveType.class }) public @interface CanonicalName {}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy