diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Reflections.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Reflections.java index 1a485e1..25f1be6 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Reflections.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Reflections.java @@ -58,7 +58,19 @@ public final class Reflections { } /** - * TODO + * Return the parametized type used with a concrete implementation of + * a class that accepts generics. + * + * Ex: If you declare + *
+ * public class SpecializedCollection implements Collection {
+ * // ...
+ * }
+ *
+ *
+ * then the code getGenericTypeArgument(SpecializedCollection.class , 0);
will
+ * return the type SpecializedType
.
+ *
*/
@SuppressWarnings("unchecked")
public static Return the parametized type passed to field types that accepts Generics.
+ * + *Ex: If you declare + *
+ * public class MyClass{
+ * private Collection<String> myStringCollection;
+ * }
+ *
+ *
+ * then the code getGenericTypeArgument( MyClass.class.getDeclaredField("myStringCollection") , 0);
will
+ * return the type String
.
+ *
*/
@SuppressWarnings("unchecked")
public static