My initial question was an exact duplicate of this one; that is, why is it that this interface has a runtime retention policy.
But the accepted answer does not satisfy me at all, for two reasons:
- the fact that this interface is
@Documented
has (I believe) nothing to do with it (although why@Documented
has a runtime retention policy is a mystery to me as well); - even though many "would be" functional interfaces existed in Java prior to Java 8 (
Comparable
as the answer mentions, but alsoRunnable
etc), this does not prevent them from being used as "substitutes" (for instance, you can perfecty well use aDirectoryStream.Filter
as a substitute to aPredicate
if all you do is filter onPath
, for instance).
But still, it has this retention. Which means that it has to influence the JVM behavior somehow. How?