Java Method with Generic Return Type
by Frank Kim on Sep.01, 2008, under Java SE
To create a Java method with a generic return type one can write a method like this.
protected static <T> T evaluateExpression(String tagName,
String attributeName, String attributeValue,
Class<T> expectedType, Tag tagRef,
PageContext pageContext)
You can learn more at this Java Generics FAQ.
Related posts: