se.jbee.inject.util
Class Typecast
Object
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)
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Typecast
public Typecast()
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)