Package it.tidalwave.util
Class ReflectionUtils
- java.lang.Object
- 
- it.tidalwave.util.ReflectionUtils
 
- 
 public class ReflectionUtils extends java.lang.ObjectAdapted from this article- Author:
- Ian Robertson, Fabrizio Giudici
 
- 
- 
Constructor SummaryConstructors Constructor Description ReflectionUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<?>getClass(java.lang.reflect.Type type)static <T> java.util.List<java.lang.Class<?>>getTypeArguments(java.lang.Class<T> baseClass, java.lang.Class<? extends T> childClass)Get the actual type arguments a subclass has used to extend a generic base class.static voidinjectDependencies(java.lang.Object object, java.util.Map<java.lang.Class<?>,java.lang.Object> beans)static <T> TinstantiateWithDependencies(java.lang.Class<? extends T> type, java.util.Map<java.lang.Class<?>,java.lang.Object> beans)Instantiates an object of the given class performing dependency injections through the constructor.
 
- 
- 
- 
Method Detail- 
getTypeArguments@Nonnull public static <T> java.util.List<java.lang.Class<?>> getTypeArguments(@Nonnull java.lang.Class<T> baseClass, @Nonnull java.lang.Class<? extends T> childClass)Get the actual type arguments a subclass has used to extend a generic base class.- Type Parameters:
- T- the static type of the base class
- Parameters:
- baseClass- the base class
- childClass- the subclass
- Returns:
- a list of the raw classes for the actual type arguments.
 
 - 
instantiateWithDependenciespublic static <T> T instantiateWithDependencies(@Nonnull java.lang.Class<? extends T> type, @Nonnull java.util.Map<java.lang.Class<?>,java.lang.Object> beans)Instantiates an object of the given class performing dependency injections through the constructor.- Type Parameters:
- T- the generic type of the object to instantiate
- Parameters:
- type- the dynamic type of the object to instantiate; it is expected to have a single constructor
- beans- the pool of objects to instantiate
- Returns:
- the new instance
- Throws:
- java.lang.RuntimeException- if something fails
- Since:
- 3.2-ALPHA-17
 
 - 
injectDependenciespublic static void injectDependencies(@Nonnull java.lang.Object object, @Nonnull java.util.Map<java.lang.Class<?>,java.lang.Object> beans)- Since:
- 3.2-ALPHA-17
 
 - 
getClass@CheckForNull public static java.lang.Class<?> getClass(@Nonnull java.lang.reflect.Type type)
 
- 
 
-