@SuppressWarnings("unchecked")
    public static <T> T asType(GString self, Class<T> c) {
        if (c == File.class) {
            return (T) new File(self.toString());
        } else if (Number.class.isAssignableFrom(c) || c.isPrimitive()) {
            return asType(self.toString(), c);
        }
        return DefaultGroovyMethods.asType((Object) self, c);
    }
@ SuppressWarnings ( "unchecked" ) public static < T > T asType ( GString self , Class < T > c ) { if ( c == File . class ) { return ( T ) new File ( self . toString ( ) ) ; } else if ( Number . class . isAssignableFrom ( c ) || c . isPrimitive ( ) ) { return asType ( self . toString ( ) , c ) ; } return DefaultGroovyMethods . asType ( ( Object ) self , c ) ; }
Converts the GString to a File, or delegates to the default
{@link org.codehaus.groovy.runtime.DefaultGroovyMethods#asType(Object, Class)}

@param self a GString
@param c    the desired class
@return the converted object
@since 1.5.0