import typing

import java
import java.io
import java.lang
import java.util
import javax.xml.namespace
import org.xml.sax

class XPath(java.lang.Object):
    def compile(self, arg1: str | java.lang.String, /) -> XPathExpression: ...
    @typing.overload
    def evaluate(self, arg1: str | java.lang.String, arg2: java.lang.Object | int | bool | float | str, /) -> str: ...
    @typing.overload
    def evaluate(self, arg1: str | java.lang.String, arg2: org.xml.sax.InputSource, /) -> str: ...
    @typing.overload
    def evaluate(self, arg1: str | java.lang.String, arg2: java.lang.Object | int | bool | float | str, arg3: javax.xml.namespace.QName, /) -> java.lang.Object: ...
    @typing.overload
    def evaluate(self, arg1: str | java.lang.String, arg2: org.xml.sax.InputSource, arg3: javax.xml.namespace.QName, /) -> java.lang.Object: ...
    def getNamespaceContext(self) -> javax.xml.namespace.NamespaceContext: ...
    def getXPathFunctionResolver(self) -> XPathFunctionResolver: ...
    def getXPathVariableResolver(self) -> XPathVariableResolver: ...
    def reset(self) -> None: ...
    def setNamespaceContext(self, arg1: javax.xml.namespace.NamespaceContext, /) -> None: ...
    def setXPathFunctionResolver(self, arg1: XPathFunctionResolver, /) -> None: ...
    def setXPathVariableResolver(self, arg1: XPathVariableResolver, /) -> None: ...

class XPathConstants(java.lang.Object):
    BOOLEAN: typing.ClassVar[javax.xml.namespace.QName] = ...
    DOM_OBJECT_MODEL: typing.ClassVar[str] = ...
    NODE: typing.ClassVar[javax.xml.namespace.QName] = ...
    NODESET: typing.ClassVar[javax.xml.namespace.QName] = ...
    NUMBER: typing.ClassVar[javax.xml.namespace.QName] = ...
    STRING: typing.ClassVar[javax.xml.namespace.QName] = ...

class XPathException(java.lang.Exception):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, cause: java.lang.Throwable, /) -> None: ...
    def getCause(self) -> java.lang.Throwable: ...
    @typing.overload
    def printStackTrace(self) -> None: ...
    @typing.overload
    def printStackTrace(self, s: java.io.PrintStream, /) -> None: ...
    @typing.overload
    def printStackTrace(self, s: java.io.PrintWriter, /) -> None: ...

class XPathExpression(java.lang.Object):
    @typing.overload
    def evaluate(self, arg1: java.lang.Object | int | bool | float | str, /) -> str: ...
    @typing.overload
    def evaluate(self, arg1: org.xml.sax.InputSource, /) -> str: ...
    @typing.overload
    def evaluate(self, arg1: java.lang.Object | int | bool | float | str, arg2: javax.xml.namespace.QName, /) -> java.lang.Object: ...
    @typing.overload
    def evaluate(self, arg1: org.xml.sax.InputSource, arg2: javax.xml.namespace.QName, /) -> java.lang.Object: ...

class XPathExpressionException(XPathException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, cause: java.lang.Throwable, /) -> None: ...

class XPathFactory(java.lang.Object):
    DEFAULT_OBJECT_MODEL_URI: typing.ClassVar[str] = ...
    DEFAULT_PROPERTY_NAME: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def getFeature(self, arg1: str | java.lang.String, /) -> bool: ...
    def isObjectModelSupported(self, arg1: str | java.lang.String, /) -> bool: ...
    @typing.overload
    @staticmethod
    def newInstance() -> XPathFactory: ...
    @typing.overload
    @staticmethod
    def newInstance(uri: str | java.lang.String, /) -> XPathFactory: ...
    @typing.overload
    @staticmethod
    def newInstance(uri: str | java.lang.String, factoryClassName: str | java.lang.String, classLoader: java.lang.ClassLoader, /) -> XPathFactory: ...
    def newXPath(self) -> XPath: ...
    def setFeature(self, arg1: str | java.lang.String, arg2: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setXPathFunctionResolver(self, arg1: XPathFunctionResolver, /) -> None: ...
    def setXPathVariableResolver(self, arg1: XPathVariableResolver, /) -> None: ...

class XPathFactoryConfigurationException(XPathException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, cause: java.lang.Throwable, /) -> None: ...

class XPathFunction(java.lang.Object):
    def evaluate(self, arg1: java.util.List, /) -> java.lang.Object: ...

class XPathFunctionException(XPathExpressionException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, cause: java.lang.Throwable, /) -> None: ...

class XPathFunctionResolver(java.lang.Object):
    def resolveFunction(self, arg1: javax.xml.namespace.QName, arg2: int | java.jint | java.lang.Integer, /) -> XPathFunction: ...

class XPathVariableResolver(java.lang.Object):
    def resolveVariable(self, arg1: javax.xml.namespace.QName, /) -> java.lang.Object: ...
