public class TypeBindings
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
asKey(java.lang.Class<?> rawBase)
Factory method that will create an object that can be used as a key for
caching purposes by
TypeFactory |
static TypeBindings |
create(java.lang.Class<?> erasedType,
JavaType typeArg1) |
static TypeBindings |
create(java.lang.Class<?> erasedType,
JavaType[] types) |
static TypeBindings |
create(java.lang.Class<?> erasedType,
JavaType typeArg1,
JavaType typeArg2) |
static TypeBindings |
create(java.lang.Class<?> erasedType,
java.util.List<JavaType> typeList)
Factory method for constructing bindings for given class using specified type
parameters.
|
static TypeBindings |
createIfNeeded(java.lang.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(java.lang.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(java.lang.Object o) |
JavaType |
findBoundType(java.lang.String name)
Find type bound to specified name, if there is one; returns bound type if so, null if not.
|
java.lang.String |
getBoundName(int index) |
JavaType |
getBoundType(int index) |
java.util.List<JavaType> |
getTypeParameters()
Accessor for getting bound types in declaration order
|
int |
hashCode() |
boolean |
hasUnbound(java.lang.String name) |
boolean |
isEmpty() |
int |
size()
Returns number of bindings contained
|
java.lang.String |
toString() |
TypeBindings |
withUnboundVariable(java.lang.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()
public static TypeBindings create(java.lang.Class<?> erasedType, java.util.List<JavaType> typeList)
public static TypeBindings create(java.lang.Class<?> erasedType, JavaType[] types)
public static TypeBindings create(java.lang.Class<?> erasedType, JavaType typeArg1)
public static TypeBindings create(java.lang.Class<?> erasedType, JavaType typeArg1, JavaType typeArg2)
public static TypeBindings createIfNeeded(java.lang.Class<?> erasedType, JavaType typeArg1)
public static TypeBindings createIfNeeded(java.lang.Class<?> erasedType, JavaType[] types)
public TypeBindings withUnboundVariable(java.lang.String name)
public JavaType findBoundType(java.lang.String name)
public boolean isEmpty()
public int size()
public java.lang.String getBoundName(int index)
public JavaType getBoundType(int index)
public java.util.List<JavaType> getTypeParameters()
public boolean hasUnbound(java.lang.String name)
public java.lang.Object asKey(java.lang.Class<?> rawBase)
TypeFactory
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved