src/main/java/org/jboss/util/collection/WeakTypeCache.java
@SuppressWarnings({"unchecked", "cast"})
   public T get(Type type)
   {
      if (type == null)
         throw new IllegalArgumentException("Null type");

      if (type instanceof ParameterizedType)
         return getParameterizedType((ParameterizedType) type);
      else if (type instanceof Class)
         return getClass((Class<?>) type);
      else if (type instanceof TypeVariable)
         // TODO Figure out why we need this cast with the Sun compiler? 
         return (T) getTypeVariable((TypeVariable) type);
      else if (type instanceof GenericArrayType)
         return getGenericArrayType((GenericArrayType) type);
      else if (type instanceof WildcardType)
         return getWildcardType((WildcardType) type);
      else
         throw new UnsupportedOperationException("Unknown type: " + type + " class=" + type.getClass());
   }
@SuppressWarnings({"unchecked", "cast"})
   public T get(Type type)
   {
      if (type == null)
         throw new IllegalArgumentException("Null type");

      if (type instanceof ParameterizedType)
         return getParameterizedType((ParameterizedType) type);
      else if (type instanceof Class)
         return getClass((Class<?>) type);
      else if (type instanceof TypeVariable)
         // TODO Figure out why we need this cast with the Sun compiler? 
         return (T) getTypeVariable((TypeVariable) type);
      else if (type instanceof GenericArrayType)
         return getGenericArrayType((GenericArrayType) type);
      else if (type instanceof WildcardType)
         return getWildcardType((WildcardType) type);
      else
         throw new UnsupportedOperationException("Unknown type: " + type + " class=" + type.getClass());
   }
@ SuppressWarnings ( { "unchecked" , "cast" } ) public T get ( Type type ) { if ( type == null ) throw new IllegalArgumentException ( "Null type" ) ; if ( type instanceof ParameterizedType ) return getParameterizedType ( ( ParameterizedType ) type ) ; else if ( type instanceof Class ) return getClass ( ( Class < ? > ) type ) ; else if ( type instanceof TypeVariable ) // TODO Figure out why we need this cast with the Sun compiler?  return ( T ) getTypeVariable ( ( TypeVariable ) type ) ; else if ( type instanceof GenericArrayType ) return getGenericArrayType ( ( GenericArrayType ) type ) ; else if ( type instanceof WildcardType ) return getWildcardType ( ( WildcardType ) type ) ; else throw new UnsupportedOperationException ( "Unknown type: " + type + " class=" + type . getClass ( ) ) ; }
Get the information for a type

@param type the type
@return the info
Get the information for a type