Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.java.proxies;
 
 import org.jruby.Ruby;
A proxy cache that uses Java 7's ClassValue.
 
 public class ClassValueProxyCache extends ProxyCache {
    public ClassValueProxyCache(Ruby runtime) {
        super(runtime);
    }
    
    public JavaClass get(Class cls) {
        return (JavaClass).get(cls);
    }
    
    private final ClassValue proxy = new ClassValue() {
        @Override
        protected Object computeValue(Class type) {
            return new JavaClass(type);
        }
    };
New to GrepCode? Check out our FAQ X