java.util.function.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mmm-util-backport-java.util.function Show documentation
Show all versions of mmm-util-backport-java.util.function Show documentation
A backport for java.util.function to be used in java versions older than 1.8. As there are no default methods before 1.8 the backport is very limited.
It only allows to create libraries with modern APIs to allow 1.8 code to use nice and natural lambdas without locking out users with older java versions.
ATTENTION: This only works with -Xbootclasspath. Also it is inofficial and invalid according to JCP/JSR. However, we need a working update-path to 1.8.
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
/**
* Contains a back-port of the according package from java 1.8+ for older java versions.
* Back-port of java.util.function
* This package contains java 1.5 compatible code to back-port the java.util.function
* package for older java versions. This allows to make use of functional interfaces in your code without strictly
* requiring the users of your code to use java 1.8+. Of course this only works when using the functional interfaces
* in classical java style without using closures / lambda expressions. However, then your code opens the gate for the
* java 1.8 world and other code can use advanced java 1.8 features.
* ATTENTION:
* Regular {@link java.lang.ClassLoader}s in java prevent loading classes in package-namespace java.*
for
* reasonable purpose. Therefore, you can not simply add this back-port as JAR to your classpath. This would result in
* the following error:
*
* java.lang.SecurityException: Prohibited package name: java.util.function
*
* To solve this problem there are the following options:
*
* - Use the JVM option
-Xbootclasspath/p:/path/to/mmm-util-backport-java.util.function-1.0.0.jar
(recommended)
* - Use the JVM option
-Djava.endorsed.dirs=/path/to/directory
with a directory containing mmm-util-backport-java.util.function-1.0.0.jar
.
* - Add
mmm-util-backport-java.util.function-1.0.0.jar
to the $JAVA_HOME/lib/endorsed
(not recommended).
*
*/
package java.util.function;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy