framework.src.org.checkerframework.common.reflection.qual.MethodVal 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.common.reflection.qual;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.checkerframework.framework.qual.SubtypeOf;
/**
* This represents a set of {@link java.lang.reflect.Method Method} or
* {@link java.lang.reflect.Constructor Constructor} values. If an
* expression's type has @MethodVal
, then the expression's
* run-time value is one of those values.
*
*
* Each of @MethodVal
's argument lists must be of equal length,
* and { className[i], methodName[i], params[i] } represents one of the
* Method
or Constructor
values in the set.
*
* @checker_framework.manual #methodval-and-classval-checkers MethodVal Checker
*/
@SubtypeOf({ UnknownMethod.class })
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE_USE, ElementType.TYPE_PARAMETER })
public @interface MethodVal {
/** The binary name
* of the class that declares this method. */
String[] className();
/** The name of the method that this Method object represents.
* Use <init>
for constructors. */
String[] methodName();
/** The number of parameters to the method. */
int[] params();
}