org.checkerframework.checker.mustcall.MustCallChecker 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.mustcall;
import org.checkerframework.checker.mustcall.qual.MustCall;
import org.checkerframework.common.basetype.BaseTypeChecker;
import org.checkerframework.framework.qual.StubFiles;
import org.checkerframework.framework.source.SupportedOptions;
/**
* This typechecker ensures that {@code @}{@link MustCall} annotations are consistent with one
* another. The Resource Leak Checker verifies that the given methods are actually called.
*/
@StubFiles({
"IOUtils.astub",
"JavaEE.astub",
"JdkCompiler.astub",
"Reflection.astub",
"SocketCreatesMustCallFor.astub",
})
@SupportedOptions({
MustCallChecker.NO_CREATES_MUSTCALLFOR,
MustCallChecker.NO_LIGHTWEIGHT_OWNERSHIP,
MustCallChecker.NO_RESOURCE_ALIASES
})
public class MustCallChecker extends BaseTypeChecker {
/**
* Disables @CreatesMustCallFor support. Not of interest to most users. Not documented in the
* manual.
*/
public static final String NO_CREATES_MUSTCALLFOR = "noCreatesMustCallFor";
/**
* Disables @Owning/@NotOwning support. Not of interest to most users. Not documented in the
* manual.
*/
public static final String NO_LIGHTWEIGHT_OWNERSHIP = "noLightweightOwnership";
/**
* Disables @MustCallAlias support. Not of interest to most users. Not documented in the manual.
*/
public static final String NO_RESOURCE_ALIASES = "noResourceAliases";
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy