--- old/src/java.base/share/classes/sun/misc/JavaLangAccess.java 2015-01-10 13:43:10.492145041 +0100 +++ new/src/java.base/share/classes/sun/misc/JavaLangAccess.java 2015-01-10 13:43:10.397146934 +0100 @@ -29,6 +29,7 @@ import java.lang.reflect.Executable; import java.security.AccessControlContext; import java.util.Map; +import java.util.function.Function; import sun.reflect.ConstantPool; import sun.reflect.annotation.AnnotationType; @@ -80,6 +81,14 @@ */ > E[] getEnumConstantsShared(Class klass); + /** + * If given Class represents a generic class or interface, then the result of + * applying given function to the Class object is returned, otherwise null. + * The result is cached in per-Class map using identity of given key. + */ + D getGenericDerivative(Class clazz, Object key, + Function, ? extends D> function); + /** Set thread's blocker field. */ void blockedOn(Thread t, Interruptible b);