接口 ConditionalHint
public interface ConditionalHint
Contract for
runtime hints that only apply
if the described condition is met.- 从以下版本开始:
- 4.0
- 作者:
- Brian Clozel
-
方法概要
修饰符和类型方法说明default booleanconditionMatches(ClassLoader classLoader) Whether the condition described for this hint is met.Return the type that should be reachable for this hint to apply, ornullif this hint should always been applied.
-
方法详细资料
-
getReachableType
Return the type that should be reachable for this hint to apply, ornullif this hint should always been applied.- 返回:
- the reachable type, if any
-
conditionMatches
Whether the condition described for this hint is met. If it is not, the hint does not apply.Instead of checking for actual reachability of a type in the application, the classpath is checked for the presence of this type as a simple heuristic.
- 参数:
classLoader- the current classloader- 返回:
- whether the condition is met and the hint applies
-