import typing

import java.chaquopy
import java.lang
import java.lang.reflect

class Annotation(java.lang.Object):
    def annotationType(self) -> typing.Type[Annotation]: ...
    def equals(self, arg1: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

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

class AnnotationTypeMismatchException(java.lang.RuntimeException):
    def __init__(self, element: java.lang.reflect.Method, foundType: str | java.lang.String, /) -> None: ...
    def element(self) -> java.lang.reflect.Method: ...
    def foundType(self) -> str: ...

class Documented(Annotation): ...

class ElementType(java.lang.Enum[ElementType]):
    ANNOTATION_TYPE: typing.ClassVar[ElementType] = ...
    CONSTRUCTOR: typing.ClassVar[ElementType] = ...
    FIELD: typing.ClassVar[ElementType] = ...
    LOCAL_VARIABLE: typing.ClassVar[ElementType] = ...
    METHOD: typing.ClassVar[ElementType] = ...
    MODULE: typing.ClassVar[ElementType] = ...
    PACKAGE: typing.ClassVar[ElementType] = ...
    PARAMETER: typing.ClassVar[ElementType] = ...
    RECORD_COMPONENT: typing.ClassVar[ElementType] = ...
    TYPE: typing.ClassVar[ElementType] = ...
    TYPE_PARAMETER: typing.ClassVar[ElementType] = ...
    TYPE_USE: typing.ClassVar[ElementType] = ...
    @staticmethod
    def valueOf(name: str | java.lang.String, /) -> ElementType: ...
    @staticmethod
    def values() -> java.chaquopy.JavaArray[ElementType]: ...

class IncompleteAnnotationException(java.lang.RuntimeException):
    def __init__(self, annotationType: typing.Type[Annotation], elementName: str | java.lang.String, /) -> None: ...
    def annotationType(self) -> typing.Type[Annotation]: ...
    def elementName(self) -> str: ...

class Inherited(Annotation): ...

class Native(Annotation): ...

class Repeatable(Annotation):
    def value(self) -> typing.Type[Annotation]: ...

class Retention(Annotation):
    def value(self) -> RetentionPolicy: ...

class RetentionPolicy(java.lang.Enum[RetentionPolicy]):
    CLASS: typing.ClassVar[RetentionPolicy] = ...
    RUNTIME: typing.ClassVar[RetentionPolicy] = ...
    SOURCE: typing.ClassVar[RetentionPolicy] = ...
    @staticmethod
    def valueOf(name: str | java.lang.String, /) -> RetentionPolicy: ...
    @staticmethod
    def values() -> java.chaquopy.JavaArray[RetentionPolicy]: ...

class Target(Annotation):
    def value(self) -> java.chaquopy.JavaArray[ElementType]: ...
