Interface ReflectiveConstraint

All Known Implementing Classes:
ClassTypeConstraint, VisibilityConstraint

@Experimental public interface ReflectiveConstraint
A set of checks performed on a ReflectiveHandle to determine whether it meets certain requirements based on its JVM signature before we can use it. Usually these are conditions that the standard Java's reflection API doesn't care about. For example, Class.forName(String) doesn't care whether the class is an enum/interface/abstract, but you could add these additional checks using ClassTypeConstraint.

If the check against appliesTo(ReflectiveHandle, Object) fails, a ReflectiveConstraintException should be thrown.

All constraints must be incompatible with each other. Menaing that two different constraints from the same class/category should not be able to co-exist.

This class should not be directly used in most cases.

Since:
12.0.0
See Also: