public class CacheTypeCapture<T> extends Object implements CacheType<T>
Cache2kBuilder:
CacheBuilder.newCache().valueType(new CacheType<List<String>(){}).build()
This constructs a cache with the known type List<String> for its value.| Modifier and Type | Class and Description |
|---|---|
static class |
CacheTypeCapture.OfArray
CacheType representing an array.
|
static class |
CacheTypeCapture.OfClass
CacheType representing a class.
|
static class |
CacheTypeCapture.OfGeneric
CacheType representing a generic type.
|
DESCRIPTOR_TO_STRING_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
CacheTypeCapture() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
CacheType<T> |
getBeanRepresentation()
Return a serializable version of this type descriptor.
|
CacheType<?> |
getComponentType()
The component type in case of an array
|
Class<T> |
getType()
Class type if not an array.
|
CacheType<?>[] |
getTypeArguments()
Known type arguments, if the type is a parametrized type.
|
String |
getTypeName()
Java language compatible type name
|
int |
hashCode() |
boolean |
hasTypeArguments()
The type has generic type parameters and the concrete types are known.
|
boolean |
isArray()
This type is an array.
|
static <T> CacheType<T> |
of(Class<T> t) |
static CacheType |
of(Type t) |
public CacheType<T> getBeanRepresentation()
CacheTypegetBeanRepresentation in interface CacheType<T>public CacheType<?> getComponentType()
CacheTypegetComponentType in interface CacheType<T>public Class<T> getType()
CacheTypepublic CacheType<?>[] getTypeArguments()
CacheTypegetTypeArguments in interface CacheType<T>public String getTypeName()
CacheTypegetTypeName in interface CacheType<T>public boolean hasTypeArguments()
CacheTypeCacheType.getTypeArguments() returns the the arguments.hasTypeArguments in interface CacheType<T>public boolean isArray()
CacheTypegetComponentType().isArray().isArray in interface CacheType<T>CacheType.getComponentType()cache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.