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

org.checkerframework.checker.interning.qual.Interned Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
package org.checkerframework.checker.interning.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.ImplicitFor;
import org.checkerframework.framework.qual.LiteralKind;
import org.checkerframework.framework.qual.SubtypeOf;
import org.checkerframework.framework.qual.TypeKind;

/**
 * Indicates that a variable has been interned, i.e., that the variable refers to the canonical
 * representation of an object.
 *
 * 

To specify that all objects of a given type are interned, annotate the class declaration: * *

 *   public @Interned class MyInternedClass { ... }
 * 
* * This is equivalent to annotating every use of MyInternedClass, in a declaration or elsewhere. For * example, enum classes are implicitly so annotated. * *

This annotation is associated with the {@link * org.checkerframework.checker.interning.InterningChecker}. * * @see org.checkerframework.checker.interning.InterningChecker * @checker_framework.manual #interning-checker Interning Checker */ @SubtypeOf(UnknownInterned.class) @ImplicitFor( literals = {LiteralKind.PRIMITIVE, LiteralKind.STRING}, // everything but NULL types = { TypeKind.BOOLEAN, TypeKind.BYTE, TypeKind.CHAR, TypeKind.DOUBLE, TypeKind.FLOAT, TypeKind.INT, TypeKind.LONG, TypeKind.SHORT }) @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) public @interface Interned {}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy