
org.checkerframework.framework.util.NoContractsFromMethod 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.framework.util;
import java.util.Collections;
import java.util.Set;
import javax.lang.model.element.ExecutableElement;
/** Dummy implementation of {@link ContractsFromMethod} that only returns empty sets. */
public class NoContractsFromMethod implements ContractsFromMethod {
/** Creates a NoContractsFromMethod object. */
public NoContractsFromMethod() {}
/**
* Returns an empty set.
*
* @param executableElement the method or constructor whose contracts to retrieve
* @return an empty set
*/
@Override
public Set getContracts(ExecutableElement executableElement) {
return Collections.emptySet();
}
/**
* Returns an empty set
*
* @param executableElement the method whose contracts to return
* @return an empty set
*/
@Override
public Set getPreconditions(ExecutableElement executableElement) {
return Collections.emptySet();
}
/**
* Returns an empty set
*
* @param executableElement the method whose contracts to return
* @return an empty set
*/
@Override
public Set getPostconditions(ExecutableElement executableElement) {
return Collections.emptySet();
}
/**
* Returns an empty set.
*
* @param methodElement the method whose contracts to return
* @return an empty set
*/
@Override
public Set getConditionalPostconditions(
ExecutableElement methodElement) {
return Collections.emptySet();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy