org.apache.commons.inject.util
Class Generics

java.lang.Object
  extended by org.apache.commons.inject.util.Generics

public class Generics
extends Object

A utility class for dealing with generics.


Constructor Summary
Generics()
           
 
Method Summary
static
<T> T
cast(Object pObject)
          Casts the parameter into the given result type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generics

public Generics()
Method Detail

cast

public static <T> T cast(Object pObject)
Casts the parameter into the given result type. Using this method is inheritly unsafe, because it's tricking out the compiler. (Use it at your own risk.) On the other hand, it is an effective way to omit unnecessary compiler warnings.



Copyright © 2014 The Apache Software Foundation. All Rights Reserved.