@ SuppressWarnings ( "unchecked" ) @ Override public < T > T [ ] asArrayOf ( final Class < T > componentType ) { Class < ? > callerClass = ReflectionHelper . getDirectCallerClass ( ) ; List < T > list = evaluateMultiValues ( componentType , callerClass ) ; return list . toArray ( ( T [ ] ) java . lang . reflect . Array . newInstance ( componentType , list . size ( ) ) ) ; }
Evaluate the XPath as an array of the given type .