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

org.checkerframework.framework.qual.CFComment 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.framework.qual;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * This annotation is for comments related to the Checker Framework.
 *
 * 

Using {@code @CFComment} makes it easy to find Checker-Framework-related comments, and to copy * those comments from one version of a codebase to another (using the Annotation File Utilities). * *

Here is an example: * *


 * {@literal @}CFComment("interning: factory methods guarantee that all elements are interned")
 *  public class MyClass {
 *   {@literal @}CFComment({"nullness: non-null return type is more specific than in superclass",
 *                "signedness: comment related to Signedness type system"})
 *    public String myMethod() { ... }
 * }
 * 
* *

As a matter of style, programmers should use this annotation on the most deeply nested element * to which the comment applies (e.g., local variable rather than method, and method rather than * class). * * @checker_framework.manual #library-tips-dont-change-the-code Don't change the code */ @Documented @Retention(RetentionPolicy.SOURCE) public @interface CFComment { /** * Comments about Checker Framework annotations. The text is not interpreted by the Checker * Framework. * *

If you prefix each comment by the name of the type system, the comments are easier to * understand and search for. */ String[] value(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy