question: public static Class toReturnType ( QName resultType , Class optionalCastToType ) { if ( optionalCastToType != null ) { return optionalCastToType ; } if ( resultType . equals ( XPathConstants . NODESET ) ) return NodeList . class ; if ( resultType . equals ( XPathConstants . NODE ) ) return Node . class ; if ( resultType . equals ( XPathConstants . BOOLEAN ) ) return Boolean . class ; if ( resultType . equals ( XPathConstants . NUMBER ) ) return Double . class ; if ( resultType . equals ( XPathConstants . STRING ) ) return String . class ; return String . class ; }
target:  Returns the native type based on XPathConstants qname and an optional cast-to type, if provided.