Interface DeclarationInfo

    • Method Detail

      • isType

        default boolean isType()
        Description copied from interface: AnnotationTarget
        Returns whether this annotation target is a type.
        Specified by:
        isType in interface AnnotationTarget
        Returns:
        true if this is a type, false otherwise
      • isPackage

        default boolean isPackage()
        Returns whether this declaration is a package.
        Returns:
        true if this is a package, false otherwise
      • isClass

        default boolean isClass()
        Returns whether this declaration is a class.
        Returns:
        true if this is a class, false otherwise
      • isMethod

        default boolean isMethod()
        Returns whether this declaration is a method.
        Returns:
        true if this is a method, false otherwise
      • isParameter

        default boolean isParameter()
        Returns whether this declaration is a method parameter.
        Returns:
        true if this is a parameter, false otherwise
      • isField

        default boolean isField()
        Returns whether this declaration is a field.
        Returns:
        true if this is a field, false otherwise
      • isRecordComponent

        default boolean isRecordComponent()
        Returns whether this declaration is a record component.
        Returns:
        true if this is a record component, false otherwise
      • asPackage

        default PackageInfo asPackage()
        Returns this declaration as a package.
        Returns:
        this package, never null
        Throws:
        java.lang.IllegalStateException - if isPackage() returns false
      • asClass

        default ClassInfo asClass()
        Returns this declaration as a class.
        Returns:
        this class, never null
        Throws:
        java.lang.IllegalStateException - if isClass() returns false
      • asMethod

        default MethodInfo asMethod()
        Returns this declaration as a method.
        Returns:
        this method, never null
        Throws:
        java.lang.IllegalStateException - if isMethod() returns false
      • asField

        default FieldInfo asField()
        Returns this declaration as a field.
        Returns:
        this field, never null
        Throws:
        java.lang.IllegalStateException - if isField() returns false