public class TypeBindings extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
Object |
asKey(Class<?> rawBase)
Factory method that will create an object that can be used as a key for
caching purposes by
TypeFactory |
static TypeBindings |
create(Class<?> erasedType,
JavaType typeArg1) |
static TypeBindings |
create(Class<?> erasedType,
JavaType[] types) |
static TypeBindings |
create(Class<?> erasedType,
JavaType typeArg1,
JavaType typeArg2) |
static TypeBindings |
create(Class<?> erasedType,
List<JavaType> typeList)
Factory method for constructing bindings for given class using specified type
parameters.
|
static TypeBindings |
create(List<String> names,
List<JavaType> types)
Factory method for constructing bindings given names and associated types.
|
static TypeBindings |
createIfNeeded(Class<?> erasedType,
JavaType typeArg1)
Alternate factory method that may be called if it is possible that type
does or does not require type parameters; this is mostly useful for
collection- and map-like types.
|
static TypeBindings |
createIfNeeded(Class<?> erasedType,
JavaType[] types)
Alternate factory method that may be called if it is possible that type
does or does not require type parameters; this is mostly useful for
collection- and map-like types.
|
static TypeBindings |
emptyBindings() |
boolean |
equals(Object o) |
JavaType |
findBoundType(String name)
Find type bound to specified name, if there is one; returns bound type if so, null if not.
|
String |
getBoundName(int index) |
JavaType |
getBoundType(int index) |
List<JavaType> |
getTypeParameters()
Accessor for getting bound types in declaration order
|
int |
hashCode() |
boolean |
hasUnbound(String name) |
boolean |
isEmpty() |
protected Object |
readResolve() |
int |
size()
Returns number of bindings contained
|
String |
toString() |
protected JavaType[] |
typeParameterArray() |
TypeBindings |
withUnboundVariable(String name)
Method for creating an instance that has same bindings as this object,
plus an indicator for additional type variable that may be unbound within
this context; this is needed to resolve recursive self-references.
|
public static TypeBindings emptyBindings()
protected Object readResolve()
public static TypeBindings create(Class<?> erasedType, List<JavaType> typeList)
public static TypeBindings create(Class<?> erasedType, JavaType[] types)
public static TypeBindings create(Class<?> erasedType, JavaType typeArg1)
public static TypeBindings create(Class<?> erasedType, JavaType typeArg1, JavaType typeArg2)
public static TypeBindings create(List<String> names, List<JavaType> types)
public static TypeBindings createIfNeeded(Class<?> erasedType, JavaType typeArg1)
public static TypeBindings createIfNeeded(Class<?> erasedType, JavaType[] types)
public TypeBindings withUnboundVariable(String name)
public JavaType findBoundType(String name)
public boolean isEmpty()
public int size()
public String getBoundName(int index)
public JavaType getBoundType(int index)
public List<JavaType> getTypeParameters()
public boolean hasUnbound(String name)
public Object asKey(Class<?> rawBase)
TypeFactory
protected JavaType[] typeParameterArray()
Copyright © 2021 JBoss by Red Hat. All rights reserved.