org.jruby.util.collections.Java7ClassValue Maven / Gradle / Ivy
package org.jruby.util.collections;
/**
* A proxy cache that uses Java 7's ClassValue.
*/
public class Java7ClassValue extends ClassValue {
public Java7ClassValue(ClassValueCalculator calculator) {
super(calculator);
}
public T get(Class cls) {
return proxy.get(cls);
}
private final java.lang.ClassValue proxy = new java.lang.ClassValue() {
@Override
protected T computeValue(Class> type) {
return calculator.computeValue(type);
}
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy