org.hibernate.reflection.java.generics
Class IdentityTypeEnvironment

java.lang.Object
  extended by org.hibernate.reflection.java.generics.IdentityTypeEnvironment
All Implemented Interfaces:
TypeEnvironment

public class IdentityTypeEnvironment
extends Object
implements TypeEnvironment

Substitutes a Type for itself.

Author:
Davide Marchignoli, Paolo Perrotta

Field Summary
static TypeEnvironment INSTANCE
           
 
Method Summary
 Type bind(Type type)
          Binds as many generic components of the given type as possible in this context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final TypeEnvironment INSTANCE
Method Detail

bind

public Type bind(Type type)
Description copied from interface: TypeEnvironment
Binds as many generic components of the given type as possible in this context.

Warning: if the returned Type is a Class, then it's guaranteed to be a regular Java Class. In all other cases, this method might return a custom implementation of some interface that extends Type. Be sure not to mix these objects with with Java's implementations of Type to avoid potential identity problems.

This class does not support bindings involving inner classes or upper/lower bounds.

Specified by:
bind in interface TypeEnvironment
Returns:
a type where the generic arguments have been replaced by raw classes whenever this is possible.