public final class Types extends Object
Modifier and Type | Field and Description |
---|---|
static ConcreteType |
BOOLEAN |
static ConcreteType |
BYTE_ARRAY |
static ConcreteType |
STRING |
static ConcreteType |
VOID |
Modifier and Type | Method and Description |
---|---|
static ParameterizedType |
augmentableTypeFor(Type valueType)
Creates instance of
ParameterizedType where raw type is
Augmentable and actual
parameter is valueType . |
static ParameterizedType |
augmentationTypeFor(Type valueType)
Creates instance of
ParameterizedType where
raw type is Augmentation and actual parameter
is valueType . |
static ParameterizedType |
builderTypeFor(Type valueType)
Returns an instance of
ParameterizedType describing the typed
Builder <V> with concrete type of value. |
static ParameterizedType |
classType(Type type)
Returns an instance of
ParameterizedType which represents JAVA java.lang.Class type
specialized to specified type. |
static <T extends Number & Comparable<T>> |
getDefaultRestrictions(T min,
T max) |
static @Nullable String |
getOuterClassName(Type valueType) |
static boolean |
isListType(Type type) |
static ParameterizedType |
listenableFutureTypeFor(Type valueType)
Returns an instance of
ParameterizedType describing the typed ListenableFuture <V>
with concrete type of value. |
static ParameterizedType |
listTypeFor(Type valueType)
Returns an instance of
ParameterizedType describing the typed List <V> with concrete type
of value. |
static ParameterizedType |
mapTypeFor(Type keyType,
Type valueType)
Returns an instance of
ParameterizedType describing the typed Map <K,V>. |
static ConcreteType |
objectType()
Returns an instance of
ConcreteType which represents Object type. |
static ParameterizedType |
parameterizedTypeFor(Type type,
Type... parameters)
Creates instance of type
ParameterizedType . |
static ConcreteType |
primitiveVoidType()
Returns an instance of
ConcreteType which represents JAVA void type. |
static ConcreteType |
serializableType()
Returns an instance of
ConcreteType which represents Serializable type. |
static ParameterizedType |
setTypeFor(Type valueType)
Returns an instance of
ParameterizedType describing the typed Set <V> with concrete type
of value. |
static ConcreteType |
typeForClass(Class<?> cls)
Returns an instance of
ConcreteType describing the class. |
static ConcreteType |
typeForClass(Class<?> cls,
Restrictions restrictions) |
static ConcreteType |
voidType()
Returns an instance of
ConcreteType which represents JAVA java.lang.Void type. |
static WildcardType |
wildcardTypeFor(JavaTypeName identifier)
Creates instance of type
WildcardType . |
public static final ConcreteType BOOLEAN
public static final ConcreteType STRING
public static final ConcreteType VOID
public static final ConcreteType BYTE_ARRAY
public static ParameterizedType classType(Type type)
ParameterizedType
which represents JAVA java.lang.Class
type
specialized to specified type.type
- Type for which to specializeClass<Type>
NullPointerException
- if type
is nullpublic static ConcreteType voidType()
ConcreteType
which represents JAVA java.lang.Void
type.ConcreteType
instance which represents JAVA java.lang.Void
public static ConcreteType objectType()
ConcreteType
which represents Object
type.ConcreteType
instance which represents Object
public static ConcreteType primitiveVoidType()
ConcreteType
which represents JAVA void
type.ConcreteType
instance which represents JAVA void
public static ConcreteType serializableType()
ConcreteType
which represents Serializable
type.ConcreteType
instance which represents JAVA Serializable
public static ConcreteType typeForClass(Class<?> cls)
ConcreteType
describing the class.cls
- Class to describepublic static ConcreteType typeForClass(Class<?> cls, Restrictions restrictions)
public static ParameterizedType mapTypeFor(Type keyType, Type valueType)
ParameterizedType
describing the typed Map
<K,V>.keyType
- Key TypevalueType
- Value Typepublic static ParameterizedType setTypeFor(Type valueType)
ParameterizedType
describing the typed Set
<V> with concrete type
of value.valueType
- Value Typepublic static ParameterizedType listTypeFor(Type valueType)
ParameterizedType
describing the typed List
<V> with concrete type
of value.valueType
- Value Typepublic static boolean isListType(Type type)
public static ParameterizedType listenableFutureTypeFor(Type valueType)
ParameterizedType
describing the typed ListenableFuture
<V>
with concrete type of value.valueType
- Value Typepublic static ParameterizedType builderTypeFor(Type valueType)
ParameterizedType
describing the typed
Builder
<V> with concrete type of value.valueType
- Value Typepublic static ParameterizedType parameterizedTypeFor(Type type, Type... parameters)
ParameterizedType
.type
- JAVA Type
for raw typeparameters
- JAVA Type
s for actual parameter typesParametrizedType
representation of type
and its parameters
NullPointerException
- if any argument or any member of parameters
is nullpublic static WildcardType wildcardTypeFor(JavaTypeName identifier)
WildcardType
.identifier
- JavaTypeName of the typeWildcardType
representation of specified identifierpublic static ParameterizedType augmentableTypeFor(Type valueType)
ParameterizedType
where raw type is
Augmentable
and actual
parameter is valueType
.valueType
- JAVA Type
with actual parameterParametrizedType
representation of raw type
Augmentable
with actual parameter
valueType
public static ParameterizedType augmentationTypeFor(Type valueType)
ParameterizedType
where
raw type is Augmentation
and actual parameter
is valueType
.valueType
- JAVA Type
with actual parameterParametrizedType
reprezentation of raw type
Augmentation
with actual parameter
valueType
public static <T extends Number & Comparable<T>> org.opendaylight.mdsal.binding.model.util.Types.DefaultRestrictions<T> getDefaultRestrictions(T min, T max)
Copyright © 2019 OpenDaylight. All rights reserved.