framework.src.org.checkerframework.qualframework.base.QualifiedTypes 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.qualframework.base;
import java.util.*;
import com.sun.source.tree.ExpressionTree;
import org.checkerframework.qualframework.base.QualifiedTypeMirror.QualifiedExecutableType;
/** Helper functions for various manipulations of {@link QualifiedTypeMirror}s.
*/
public interface QualifiedTypes {
/**
* Returns the method parameters for the invoked method, with the same number
* of arguments passed in the methodInvocation tree.
*
* If the invoked method is not a vararg method or it is a vararg method
* but the invocation passes an array to the vararg parameter, it would simply
* return the method parameters.
*
* Otherwise, it would return the list of parameters as if the vararg is expanded
* to match the size of the passed arguments.
*
* @param method the method's type
* @param args the arguments to the method invocation
* @return the types that the method invocation arguments need to be subtype of
*/
public List> expandVarArgs(
QualifiedExecutableType method,
List args);
}