Class CacheTypeCapture<T>

  • All Implemented Interfaces:
    CacheType<T>

    public class CacheTypeCapture<T>
    extends Object
    implements CacheType<T>
    Helper class to capture generic types into a type descriptor. This is used to provide the cache with detailed type information of the key and value objects. Example usage with Cache2kBuilder:
       
    
       CacheBuilder.newCache().valueType(new CacheType<List<String>(){}).build()
     
    This constructs a cache with the known type List<String> for its value.
    Author:
    Jens Wilke
    See Also:
    Google Guava CacheType explaination