Silk DI 0.6


se.jbee.inject.util
Class Typecast

Object
  extended by se.jbee.inject.util.Typecast

public final class Typecast
extends Object

Util to get rid of warnings for known generic Types. Implementation Note: storing the the raw type in a var before returning the generic type is a workaround to make this compile with javac (cast works with javaw).

Author:
Jan Bernitt (jan@jbee.se)

Constructor Summary
Typecast()
           
 
Method Summary
static
<T> Type<Collection<T>>
collectionTypeOf(Class<T> elementType)
           
static
<T> Type<Collection<T>>
collectionTypeOf(Type<T> elementType)
           
static
<T> Type<Factory<T>>
factoryTypeOf(Class<T> providedType)
           
static
<T> Type<Factory<T>>
factoryTypeOf(Type<T> providedType)
           
static
<T> Type<Injectron<T>[]>
injectronsTypeOf(Class<T> providedType)
           
static
<T> Type<Injectron<T>[]>
injectronsTypeOf(Type<T> providedType)
           
static
<T> Type<Injectron<T>>
injectronTypeOf(Class<T> providedType)
           
static
<T> Type<Injectron<T>>
injectronTypeOf(Type<T> providedType)
           
static
<T> Type<List<T>>
listTypeOf(Class<T> elementType)
           
static
<T> Type<List<T>>
listTypeOf(Type<T> elementType)
           
static
<T> Type<Provider<T>>
providerTypeOf(Class<T> providedType)
           
static
<T> Type<Provider<T>>
providerTypeOf(Type<T> providedType)
           
static
<T> Type<Set<T>>
setTypeOf(Class<T> elementType)
           
static
<T> Type<Set<T>>
setTypeOf(Type<T> elementType)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Typecast

public Typecast()
Method Detail

listTypeOf

public static <T> Type<List<T>> listTypeOf(Class<T> elementType)

listTypeOf

public static <T> Type<List<T>> listTypeOf(Type<T> elementType)

setTypeOf

public static <T> Type<Set<T>> setTypeOf(Class<T> elementType)

setTypeOf

public static <T> Type<Set<T>> setTypeOf(Type<T> elementType)

collectionTypeOf

public static <T> Type<Collection<T>> collectionTypeOf(Class<T> elementType)

collectionTypeOf

public static <T> Type<Collection<T>> collectionTypeOf(Type<T> elementType)

providerTypeOf

public static <T> Type<Provider<T>> providerTypeOf(Class<T> providedType)

providerTypeOf

public static <T> Type<Provider<T>> providerTypeOf(Type<T> providedType)

factoryTypeOf

public static <T> Type<Factory<T>> factoryTypeOf(Class<T> providedType)

factoryTypeOf

public static <T> Type<Factory<T>> factoryTypeOf(Type<T> providedType)

injectronTypeOf

public static <T> Type<Injectron<T>> injectronTypeOf(Class<T> providedType)

injectronTypeOf

public static <T> Type<Injectron<T>> injectronTypeOf(Type<T> providedType)

injectronsTypeOf

public static <T> Type<Injectron<T>[]> injectronsTypeOf(Class<T> providedType)

injectronsTypeOf

public static <T> Type<Injectron<T>[]> injectronsTypeOf(Type<T> providedType)

Silk DI 0.6