public interface Type extends HasCopy<Type>, HasName<Type>, HasGenerics<Type>, HasAnnotationUsage<Type>
Type
that is used.Modifier and Type | Interface and Description |
---|---|
static class |
Type.Factory
Factory holder.
|
Modifier and Type | Method and Description |
---|---|
int |
getArrayDimension()
Returns the array dimension of this type.
|
Optional<Class<?>> |
getJavaImpl()
Returns the implementation used in this type, or an
empty
if no such is defined for this type. |
static Type |
of(Class<?> clazz)
Creates a new instance implementing this interface by using the class
supplied by the default factory.
|
static Type |
of(String name)
Creates a new instance implementing this interface by using the class
supplied by the default factory.
|
Type |
setArrayDimension(int arrayDimension)
Sets the dimension for the array in this type.
|
Type |
setJavaImpl(Class<?> javaImpl)
Sets the java class to reference with this type.
|
static void |
setMapper(Function<String,Type> supplier)
Sets the instantiation method used to create new instances of this
interface.
|
add, getGenerics
add, getAnnotations
Type setJavaImpl(Class<?> javaImpl)
Class#getSimpleName()
method.javaImpl
- the new implementationOptional<Class<?>> getJavaImpl()
empty
if no such is defined for this type.empty
Type setArrayDimension(int arrayDimension)
Here are some examples:
String → 0 String[] → 1 String[][] → 2 String[][][] → 3
arrayDimension
- the new array dimensionint getArrayDimension()
static Type of(String name)
setSupplier
method.name
- the type namestatic Type of(Class<?> clazz)
setSupplier
method.clazz
- the java implementationCopyright © 2016 Speedment, Inc.. All rights reserved.