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

framework.src.org.checkerframework.common.basetype.TypeValidator 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.42.0
Show newest version
package org.checkerframework.common.basetype;

import com.sun.source.tree.Tree;
import org.checkerframework.framework.type.AnnotatedTypeMirror;

/**
 * TypeValidator ensures that a type for a given tree is valid both for the tree
 * and the type system that is being used to check the tree.
 */
public interface TypeValidator {

    /** The entry point to the type validator.
     * Validate the type against the given tree.
     *
     * @param type the type to validate
     * @param tree the tree from which the type originated.
     *   Note that the tree might be a method tree - the
     *     return type should then be validated.
     *   Note that the tree might be a variable tree - the
     *     field type should then be validated.
     * @return true, iff the type is valid
     */
    public boolean isValid(AnnotatedTypeMirror type, Tree tree);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy