- Revision
- 547
- Author
- rfscholte
- Date
- 2009-02-16 13:58:12 -0600 (Mon, 16 Feb 2009)
Log Message
added Type.getGenericValue() to model-documentation
Modified Paths
Diff
Modified: trunk/qdox/src/site/content/model.html (546 => 547)
--- trunk/qdox/src/site/content/model.html 2009-02-16 19:09:28 UTC (rev 546) +++ trunk/qdox/src/site/content/model.html 2009-02-16 19:58:12 UTC (rev 547) @@ -302,7 +302,7 @@ <td><a href="" <td> <p>Represents a specific instance of a class used by another class (such as return value, superclass, etc). - The value represents the name of the class. Array dimensions are also available.</p> + The value represents the name of the class. Array dimensions are also available. Since 1.8 it's also possible to get the generic value of the Type</p> <h5>Example Input</h5> @@ -312,7 +312,7 @@ public class MyClass { public void stuff(int n, Object[] objects, - Date[][] dates) { + Date[][] dates, List<String> stringList) { ... } @@ -338,16 +338,23 @@ objects.getArray(); // true objects.getDimensions(); // 1 -Type dates = m.getParameters()[1].getType(); +Type dates = m.getParameters()[2].getType(); dates.getValue(); // "java.util.Date" dates.getArray(); // true dates.getDimensions(); // 2 + +Type stringList = m.getParameters()[3].getType(); +stringList.getValue(); // "java.util.List" +stringList.getGenericValue(); // "java.util.List<java.lang.String>" +stringList.getArray(); // false +stringList.getDimensions(); // 0 </pre></div> </td> <td> <code> <nobr>String <a href="" + <nobr>String <a href="" <nobr>boolean <a href="" <nobr>int <a href="" <br/>
To unsubscribe from this list please visit:
