public final class Values extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Class<T> |
heapClassFor(Class<T> valueType)
Generates (if not yet) and returns a heap implementation for the given value interface.
|
static boolean |
isValueInterfaceOrImplClass(Class<?> valueTypeOrImplClass) |
static <T> Class<T> |
nativeClassFor(Class<T> valueType)
Generates (if not yet) and returns a native (flyweight) implementation for the given value
interface.
|
static <T> T |
newHeapInstance(Class<T> valueType)
Equivalent for
heapClassFor(valueType).newInstance(). |
static <T> T |
newNativeReference(Class<T> valueType)
Equivalent for
nativeClassFor(valueType).newInstance(). |
public static boolean isValueInterfaceOrImplClass(Class<?> valueTypeOrImplClass)
public static <T> T newHeapInstance(Class<T> valueType)
heapClassFor(valueType).newInstance().IllegalArgumentException - if the given valueType is not a value interfaceImplGenerationFailedException - if generation of a heap implementation failedpublic static <T> T newNativeReference(Class<T> valueType)
nativeClassFor(valueType).newInstance().IllegalArgumentException - if the given valueType is not a value interfaceImplGenerationFailedException - if generation of a native implementation failedpublic static <T> Class<T> heapClassFor(Class<T> valueType)
T - the value interface as a type parametervalueType - the value interface to return a heap implementation forIllegalArgumentException - if the given valueType is not a value interfaceImplGenerationFailedException - if generation of a heap implementation failedpublic static <T> Class<T> nativeClassFor(Class<T> valueType)
T - the value interface as a type parametervalueType - the value interface to return a native implementation forIllegalArgumentException - if the given valueType is not a value interfaceImplGenerationFailedException - if generation of a native implementation failedCopyright © 2016. All rights reserved.