com.fasterxml.classmate
Class TypeBindings

java.lang.Object
  extended by com.fasterxml.classmate.TypeBindings

public final class TypeBindings
extends Object

Helper class used for storing binding of local type variables to matching resolved types, in context of a single class.


Method Summary
static TypeBindings create(Class<?> erasedType, List<ResolvedType> typeList)
          Factory method for constructing bindings for given class using specified type parameters.
static TypeBindings create(Class<?> erasedType, ResolvedType[] types)
           
static TypeBindings emptyBindings()
           
 boolean equals(Object o)
           
 ResolvedType 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)
           
 ResolvedType getBoundType(int index)
           
 List<ResolvedType> getTypeParameters()
          Accessor for getting bound types in declaration order
 int hashCode()
           
 boolean isEmpty()
           
 int size()
          Returns number of bindings contained
 String toString()
           
protected  ResolvedType[] typeParameterArray()
           
 TypeBindings withAdditionalBinding(String name, ResolvedType type)
          Method for creating an instance that has same bindings as this object, plus one additional binding
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

emptyBindings

public static TypeBindings emptyBindings()

create

public static TypeBindings create(Class<?> erasedType,
                                  List<ResolvedType> typeList)
Factory method for constructing bindings for given class using specified type parameters.


create

public static TypeBindings create(Class<?> erasedType,
                                  ResolvedType[] types)

withAdditionalBinding

public TypeBindings withAdditionalBinding(String name,
                                          ResolvedType type)
Method for creating an instance that has same bindings as this object, plus one additional binding


findBoundType

public ResolvedType findBoundType(String name)
Find type bound to specified name, if there is one; returns bound type if so, null if not.


isEmpty

public boolean isEmpty()

size

public int size()
Returns number of bindings contained


getBoundName

public String getBoundName(int index)

getBoundType

public ResolvedType getBoundType(int index)

getTypeParameters

public List<ResolvedType> getTypeParameters()
Accessor for getting bound types in declaration order


toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

typeParameterArray

protected ResolvedType[] typeParameterArray()


Copyright © 2011 fasterxml.com. All Rights Reserved.