![JAR search and dependency download from the Maven repository](/logo.png)
org.checkerframework.checker.optional.OptionalChecker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checker Show documentation
Show all versions of checker Show documentation
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.
package org.checkerframework.checker.optional;
import java.util.Optional;
import org.checkerframework.common.basetype.BaseTypeChecker;
import org.checkerframework.framework.qual.RelevantJavaTypes;
import org.checkerframework.framework.qual.StubFiles;
/**
* A type-checker that prevents misuse of the {@link java.util.Optional} class.
*
* @checker_framework.manual #optional-checker Optional Checker
*/
// TODO: For a call to ofNullable, if the argument has type
// @NonNull, make the return type have type @Present.
@RelevantJavaTypes(Optional.class)
@StubFiles({"javaparser.astub"})
public class OptionalChecker extends BaseTypeChecker {
/** Create an OptionalChecker. */
public OptionalChecker() {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy