Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.util.collections;
 
 import org.jruby.Ruby;

A proxy cache that uses Java 7's ClassValue.
 
 public class Java7ClassValue<T> extends ClassValue<T> {
     public Java7ClassValue(ClassValueCalculator<T> calculator) {
        super(calculator);
    }
    
    public T get(Class cls) {
        return .get(cls);
    }
    
    private final java.lang.ClassValue<T> proxy = new java.lang.ClassValue<T>() {
        @Override
        protected T computeValue(Class<?> type) {
            return .computeValue(type);
        }
    };
New to GrepCode? Check out our FAQ X