Ejemplo n.º 1
0
public virtual global::System.Object evaluate(global::java.lang.Object n1, global::[email protected] n2){
//XMLVM_BEGIN_WRAPPER[gnu.xml.xpath.Expr: java.lang.Object evaluate(java.lang.Object, javax.xml.namespace.QName)]
    global::System.Object _r0_o = null;
    global::System.Object _r1_o = null;
    global::System.Object _r2_o = null;
    global::System.Object _r3_o = null;
    global::System.Object _r4_o = null;
    global::System.Object _r5_o = null;
    global::org.xmlvm._nElement _r6;
    global::System.Object _r6_o = null;
    global::org.xmlvm._nElement _r7;
    global::System.Object _r7_o = null;
    global::System.Object _r8_o = null;
    global::System.Object _r9_o = null;
    global::System.Object _r10_o = null;
    global::System.Object _r11_o = null;
    _r9_o = this;
    _r10_o = n1;
    _r11_o = n2;
    _r7.i = 1;
    // Value=return value is not a node-set
    _r8_o = new global::java.lang.String();
    ((global::java.lang.String)_r8_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)114)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 118)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 116))}));
    _r4_o = null;
    _r1_o = null;
    _r6.i = ((_r10_o != null) && (_r10_o is global::org.w3c.dom.Node)) ? 1 : 0;
    if (_r6.i == 0) goto label155;
    _r0_o = _r10_o;
    _r1_o = _r0_o;
    _r4_o = ((global::gnu.xml.xpath.Expr) _r9_o).evaluate((global::org.w3c.dom.Node) _r1_o, (int) _r7.i, (int) _r7.i);
    _r6_o = global::javax.xml.xpath.XPathConstants._fSTRING;
    if (_r6_o != _r11_o) goto label31;
    _r6.i = ((_r4_o != null) && (_r4_o is global::java.lang.String)) ? 1 : 0;
    if (_r6.i != 0) goto label31;
    _r4_o = global::gnu.xml.xpath.Expr._1string((global::org.w3c.dom.Node) _r1_o, (global::java.lang.Object) _r4_o);
    _r6_o = _r4_o;
    label30:;
    return (global::java.lang.Object) _r6_o;
    label31:;
    _r6_o = global::javax.xml.xpath.XPathConstants._fNUMBER;
    if (_r6_o != _r11_o) goto label50;
    _r6.i = ((_r4_o != null) && (_r4_o is global::java.lang.Double)) ? 1 : 0;
    if (_r6.i != 0) goto label50;
    _r5_o = new global::java.lang.Double();
    _r6.d = global::gnu.xml.xpath.Expr._1number((global::org.w3c.dom.Node) _r1_o, (global::java.lang.Object) _r4_o);
    ((global::java.lang.Double) _r5_o).@this((double) _r6.d);
    _r6_o = _r5_o;
    goto label30;
    label50:;
    _r6_o = global::javax.xml.xpath.XPathConstants._fBOOLEAN;
    if (_r6_o != _r11_o) goto label73;
    _r6.i = ((_r4_o != null) && (_r4_o is global::java.lang.Boolean)) ? 1 : 0;
    if (_r6.i != 0) goto label73;
    _r6.i = global::gnu.xml.xpath.Expr._1boolean((global::org.w3c.dom.Node) _r1_o, (global::java.lang.Object) _r4_o) ? 1 : 0;
    if (_r6.i == 0) goto label69;
    _r6_o = global::java.lang.Boolean._fTRUE;
    _r4_o = _r6_o;
    label67:;
    _r6_o = _r4_o;
    goto label30;
    label69:;
    _r6_o = global::java.lang.Boolean._fFALSE;
    _r4_o = _r6_o;
    goto label67;
    label73:;
    _r6_o = global::javax.xml.xpath.XPathConstants._fNODE;
    if (_r6_o != _r11_o) goto label122;
    _r6.i = ((_r4_o != null) && (_r4_o is global::java.util.Collection)) ? 1 : 0;
    if (_r6.i == 0) goto label112;
    _r0_o = _r4_o;
    _r3_o = _r0_o;
    _r6.i = ((global::java.util.Collection) _r3_o).size();
    switch (_r6.i) {
    case 0: goto label100;
    case 1: goto label103;
    }
    _r6_o = new global::javax.xml.xpath.XPathExpressionException();
    // Value=multiple nodes in node-set
    _r7_o = new global::java.lang.String();
    ((global::java.lang.String)_r7_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)109)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 116))}));
    ((global::javax.xml.xpath.XPathExpressionException) _r6_o).@this((global::java.lang.String) _r7_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r6_o);
    label100:;
    _r4_o = null;
    label101:;
    _r6_o = _r4_o;
    goto label30;
    label103:;
    _r6_o = ((global::java.util.Collection) _r3_o).iterator();
    _r4_o = ((global::java.util.Iterator) _r6_o).next();
    goto label101;
    label112:;
    if (_r4_o == null) goto label153;
    _r6_o = new global::javax.xml.xpath.XPathExpressionException();
    // Value=return value is not a node-set
    _r7_o = new global::java.lang.String();
    ((global::java.lang.String)_r7_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)114)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 118)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 116))}));
    ((global::javax.xml.xpath.XPathExpressionException) _r6_o).@this((global::java.lang.String) _r8_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r6_o);
    label122:;
    _r6_o = global::javax.xml.xpath.XPathConstants._fNODESET;
    if (_r6_o != _r11_o) goto label153;
    if (_r4_o == null) goto label140;
    _r6.i = ((_r4_o != null) && (_r4_o is global::java.util.Collection)) ? 1 : 0;
    if (_r6.i != 0) goto label140;
    _r6_o = new global::javax.xml.xpath.XPathExpressionException();
    // Value=return value is not a node-set
    _r7_o = new global::java.lang.String();
    ((global::java.lang.String)_r7_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)114)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 118)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 117)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 32)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 45)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 116))}));
    ((global::javax.xml.xpath.XPathExpressionException) _r6_o).@this((global::java.lang.String) _r8_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r6_o);
    label140:;
    if (_r4_o == null) goto label153;
    _r0_o = _r4_o;
    _r2_o = _r0_o;
    _r4_o = new global::gnu.xml.xpath.Expr_2ExprNodeSet();
    ((global::gnu.xml.xpath.Expr_2ExprNodeSet) _r4_o).@this((global::java.util.Collection) _r2_o);
    _r6_o = _r4_o;
    goto label30;
    label153:;
    _r6_o = _r4_o;
    goto label30;
    label155:;
    _r6_o = _r4_o;
    goto label30;
//XMLVM_END_WRAPPER[gnu.xml.xpath.Expr: java.lang.Object evaluate(java.lang.Object, javax.xml.namespace.QName)]
}
Ejemplo n.º 2
0
public virtual global::System.Object compile(global::java.lang.String n1){
//XMLVM_BEGIN_WRAPPER[gnu.xml.xpath.XPathImpl: javax.xml.xpath.XPathExpression compile(java.lang.String)]
    global::System.Object _r0_o = null;
    global::System.Object _r1_o = null;
    global::System.Object _r2_o = null;
    global::System.Object _r3_o = null;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r2_o = this;
    _r3_o = n1;
    _r0_o = new global::gnu.xml.xpath.XPathTokenizer();
    ((global::gnu.xml.xpath.XPathTokenizer) _r0_o).@this((global::java.lang.String) _r3_o);
    try {
    _r1_o = ((global::gnu.xml.xpath.XPathImpl) _r2_o)._fparser;
    _r2_o = ((global::gnu.xml.xpath.XPathParser) _r1_o).yyparse((global::gnu.xml.xpath.XPathParser_2yyInput) _r0_o);
    }
    catch (global::System.Exception e) {
 global::org.xmlvm._nExceptionAdapter ex = e as global::org.xmlvm._nExceptionAdapter ?? new global::org.xmlvm._nExceptionAdapter(e.ToString(), e.ToJavaException());
        global::System.Object _java_exception = ex.getJavaException();
        if (_java_exception is global::java.io.IOException) {
            _ex = ex;
            goto label14;
        }
        if (_java_exception is global::gnu.xml.xpath.XPathParser_2yyException) {
            _ex = ex;
            goto label21;
        }
        throw ex;
    } // end catch
    return (global::javax.xml.xpath.XPathExpression) _r2_o;
    label14:;
    _r0_o = _ex.getJavaException();
    _ex = null;
    _r1_o = new global::javax.xml.xpath.XPathExpressionException();
    ((global::javax.xml.xpath.XPathExpressionException) _r1_o).@this((global::java.lang.Throwable) _r0_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r1_o);
    label21:;
    _r0_o = _ex.getJavaException();
    _ex = null;
    _r0_o = new global::javax.xml.xpath.XPathExpressionException();
    ((global::javax.xml.xpath.XPathExpressionException) _r0_o).@this((global::java.lang.String) _r3_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r0_o);
//XMLVM_END_WRAPPER[gnu.xml.xpath.XPathImpl: javax.xml.xpath.XPathExpression compile(java.lang.String)]
}
Ejemplo n.º 3
0
public virtual global::System.Object evaluate(global::org.xml.sax.InputSource n1, global::[email protected] n2){
//XMLVM_BEGIN_WRAPPER[gnu.xml.xpath.Expr: java.lang.Object evaluate(org.xml.sax.InputSource, javax.xml.namespace.QName)]
    global::System.Object _r0_o = null;
    global::System.Object _r1_o = null;
    global::System.Object _r2_o = null;
    global::System.Object _r3_o = null;
    global::System.Object _r4_o = null;
    global::System.Object _r5_o = null;
    global::System.Object _r6_o = null;
    global::System.Object _r7_o = null;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r5_o = this;
    _r6_o = n1;
    _r7_o = n2;
    try {
    _r3_o = new global::gnu.xml.dom.JAXPFactory();
    ((global::gnu.xml.dom.JAXPFactory) _r3_o).@this();
    _r0_o = ((global::javax.xml.parsers.DocumentBuilderFactory) _r3_o).newDocumentBuilder();
    _r1_o = ((global::javax.xml.parsers.DocumentBuilder) _r0_o).parse((global::org.xml.sax.InputSource) _r6_o);
    _r4_o = ((global::gnu.xml.xpath.Expr) _r5_o).evaluate((global::java.lang.Object) _r1_o, (global::[email protected]) _r7_o);
    }
    catch (global::System.Exception e) {
 global::org.xmlvm._nExceptionAdapter ex = e as global::org.xmlvm._nExceptionAdapter ?? new global::org.xmlvm._nExceptionAdapter(e.ToString(), e.ToJavaException());
        global::System.Object _java_exception = ex.getJavaException();
        if (_java_exception is global::javax.xml.parsers.ParserConfigurationException) {
            _ex = ex;
            goto label18;
        }
        if (_java_exception is global::org.xml.sax.SAXException) {
            _ex = ex;
            goto label26;
        }
        if (_java_exception is global::java.io.IOException) {
            _ex = ex;
            goto label34;
        }
        throw ex;
    } // end catch
    return (global::java.lang.Object) _r4_o;
    label18:;
    _r4_o = _ex.getJavaException();
    _ex = null;
    _r2_o = _r4_o;
    _r4_o = new global::javax.xml.xpath.XPathExpressionException();
    ((global::javax.xml.xpath.XPathExpressionException) _r4_o).@this((global::java.lang.Throwable) _r2_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r4_o);
    label26:;
    _r4_o = _ex.getJavaException();
    _ex = null;
    _r2_o = _r4_o;
    _r4_o = new global::javax.xml.xpath.XPathExpressionException();
    ((global::javax.xml.xpath.XPathExpressionException) _r4_o).@this((global::java.lang.Throwable) _r2_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r4_o);
    label34:;
    _r4_o = _ex.getJavaException();
    _ex = null;
    _r2_o = _r4_o;
    _r4_o = new global::javax.xml.xpath.XPathExpressionException();
    ((global::javax.xml.xpath.XPathExpressionException) _r4_o).@this((global::java.lang.Throwable) _r2_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::javax.xml.xpath.XPathExpressionException) _r4_o);
//XMLVM_END_WRAPPER[gnu.xml.xpath.Expr: java.lang.Object evaluate(org.xml.sax.InputSource, javax.xml.namespace.QName)]
}