com.signalfx.shaded.checkerframework.checker.interning.qual.Interned Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signalfx-codahale Show documentation
Show all versions of signalfx-codahale Show documentation
Dropwizard Codahale metrics plugin for signalfx
The newest version!
package com.signalfx.shaded.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 com.signalfx.shaded.checkerframework.framework.qual.DefaultFor;
import com.signalfx.shaded.checkerframework.framework.qual.LiteralKind;
import com.signalfx.shaded.checkerframework.framework.qual.QualifierForLiterals;
import com.signalfx.shaded.checkerframework.framework.qual.SubtypeOf;
import com.signalfx.shaded.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.
*
* @see org.checkerframework.checker.interning.InterningChecker
* @checker_framework.manual #interning-checker Interning Checker
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@SubtypeOf(UnknownInterned.class)
@QualifierForLiterals({LiteralKind.PRIMITIVE, LiteralKind.STRING}) // everything but NULL
@DefaultFor(
typeKinds = {
TypeKind.BOOLEAN,
TypeKind.BYTE,
TypeKind.CHAR,
TypeKind.DOUBLE,
TypeKind.FLOAT,
TypeKind.INT,
TypeKind.LONG,
TypeKind.SHORT
})
public @interface Interned {}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy