Class AccFlags


  • public class AccFlags
    extends Object
    Флаги методов и инструкций
    • Constructor Summary

      Constructors 
      Constructor Description
      AccFlags​(int flags)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Map<String,​Integer> flagName()  
      Set<String> flags()  
      AccFlags flags​(Set<String> flags)  
      boolean isAbstract()
      Declared abstract; must not be instantiated.
      boolean isAnnotation()
      Declared as an annotation type.
      boolean isBridge()
      A bridge method, generated by the compiler.
      boolean isDeprecated()  
      boolean isEnum()
      Declared as an enum type.
      boolean isFinal()
      Declared final; no subclasses allowed.
      boolean isInterface()
      Is an interface, not a class.
      boolean isMandated()
      Indicates that the formal parameter was implicitly declared in source code, according to the specification of the language in which the source code was written (JLS §13.1).
      boolean isModule()
      Is a module, not a class or interface.
      boolean isNative()
      Declared native; implemented in a language other than the Java programming language.
      boolean isOpen()
      Indicates that this module is open.
      boolean isPrivate()
      Declared private; accessible only within the defining class.
      boolean isProtected()
      Declared protected; may be accessed within subclasses.
      boolean isPublic()
      Declared public; may be accessed from outside its package.
      boolean isRecord()  
      boolean isStatic()
      Declared static.
      boolean isStaticPhase()
      Indicates that this dependence is mandatory in the static phase, i.e., at compile time, but is optional in the dynamic phase, i.e., at run time.
      boolean isStrict()
      Declared strictfp; floating-point mode is FP-strict.
      boolean isSuper()
      Treat superclass methods specially when invoked by the invokespecial instruction.
      boolean isSynchronized()
      Declared synchronized; invocation is wrapped by a monitor use.
      boolean isSynthetic()
      Declared synthetic; not present in the source code.
      boolean isTransient()
      Declared transient; not written or read by a persistent object manager.
      boolean isTransitive()
      Indicates that any module which depends on the current module, implicitly declares a dependence on the module indicated by this entry.
      boolean isVarArgs()
      Declared with variable number of arguments.
      boolean isVolatile()
      Declared volatile; cannot be cached.
      int value()  
      AccFlags withAbstract​(boolean v)
      set abstract
      AccFlags withAnnotation​(boolean v)
      set declared as an annotation type.
      AccFlags withBridge​(boolean v)
      A bridge method, generated by the compiler.
      AccFlags withDeprecated​(boolean v)  
      AccFlags withEnum​(boolean v)
      Declared as an enum type.
      AccFlags withFinal​(boolean v)
      Declared final; no subclasses allowed.
      AccFlags withInterface​(boolean v)
      set Is an interface, not a class.
      AccFlags withMandated​(boolean v)
      Indicates that the formal parameter was implicitly declared in source code, according to the specification of the language in which the source code was written (JLS §13.1).
      AccFlags withModule​(boolean v)
      set a module, not a class or interface.
      AccFlags withNative​(boolean v)
      Declared native; implemented in a language other than the Java programming language.
      AccFlags withOpen​(boolean v)
      Indicates that this module is open.
      AccFlags withPrivate​(boolean v)
      Declared private; accessible only within the defining class.
      AccFlags withProtected​(boolean v)
      Declared protected; may be accessed within subclasses.
      AccFlags withPublic​(boolean v)
      Declared public; may be accessed from outside its package.
      AccFlags withRecord​(boolean v)  
      AccFlags withStatic​(boolean v)
      Declared static.
      AccFlags withStaticPhase​(boolean v)
      Indicates that this dependence is mandatory in the static phase, i.e., at compile time, but is optional in the dynamic phase, i.e., at run time.
      AccFlags withStrict​(boolean v)
      Declared strictfp; floating-point mode is FP-strict.
      AccFlags withSuper​(boolean v)
      Treat superclass methods specially when invoked by the invokespecial instruction.
      AccFlags withSynchronized​(boolean v)
      Declared synchronized; invocation is wrapped by a monitor use.
      AccFlags withSynthetic​(boolean v)
      set Declared synthetic; not present in the source code.
      AccFlags withTransient​(boolean v)
      Declared transient; not written or read by a persistent object manager.
      AccFlags withTransitive​(boolean v)
      Indicates that any module which depends on the current module, implicitly declares a dependence on the module indicated by this entry.
      AccFlags withVarArgs​(boolean v)
      Declared with variable number of arguments.
      AccFlags withVolatile​(boolean v)
      Declared volatile; cannot be cached.
    • Constructor Detail

      • AccFlags

        public AccFlags​(int flags)
    • Method Detail

      • value

        public int value()
      • isPublic

        public boolean isPublic()
        Declared public; may be accessed from outside its package.
        Объявлен публичным; может быть доступен извне пакета.

        Применимо к : class, field, method

        Returns:
        is public
      • withPublic

        public AccFlags withPublic​(boolean v)
        Declared public; may be accessed from outside its package.
        Объявлен публичным; может быть доступен извне пакета.

        Применимо к : class, field, method

        Parameters:
        v - as public
        Returns:
        flags
      • isPrivate

        public boolean isPrivate()
        Declared private; accessible only within the defining class.

        Объявлен частным; доступен только внутри определяющего класса.

        Применимо к : class, field, method

        Returns:
        is private
      • withPrivate

        public AccFlags withPrivate​(boolean v)
        Declared private; accessible only within the defining class.

        Объявлен частным; доступен только внутри определяющего класса.

        Применимо к : class, field, method

        Parameters:
        v - as private
        Returns:
        flags
      • isProtected

        public boolean isProtected()
        Declared protected; may be accessed within subclasses.

        Объявлен защищенным; могут быть доступны внутри подклассов.

        Применимо к : class, field, method

        Returns:
        is protected
      • withProtected

        public AccFlags withProtected​(boolean v)
        Declared protected; may be accessed within subclasses.

        Объявлен защищенным; могут быть доступны внутри подклассов.

        Применимо к : class, field, method

        Parameters:
        v - as protected
        Returns:
        flags
      • isStatic

        public boolean isStatic()
        Declared static.

        Применимо к : field, method

        Returns:
        is static
      • withStatic

        public AccFlags withStatic​(boolean v)
        Declared static.

        Применимо к : field, method

        Parameters:
        v - as static
        Returns:
        flags
      • isFinal

        public boolean isFinal()
        Declared final; no subclasses allowed.

        Объявлен финальным; подклассы не допускаются.

        Применимо к : class, field, method, parameter

        Returns:
        is final
      • withFinal

        public AccFlags withFinal​(boolean v)
        Declared final; no subclasses allowed.

        Объявлен финальным; подклассы не допускаются.

        Применимо к : class, field, method, parameter

        Parameters:
        v - as final
        Returns:
        flags
      • isOpen

        public boolean isOpen()
        Indicates that this module is open.

        Указывает, что этот модуль открыт.

        Применимо к : module

        Returns:
        is open
      • withOpen

        public AccFlags withOpen​(boolean v)
        Indicates that this module is open.

        Указывает, что этот модуль открыт.

        Применимо к : module

        Parameters:
        v - as open module
        Returns:
        flags
      • isSuper

        public boolean isSuper()
        Treat superclass methods specially when invoked by the invokespecial instruction.

        Особо обрабатывайте методы суперкласса, когда они вызываются инструкцией invokespecial.

        Применимо к : class

        Returns:
        is super
      • withSuper

        public AccFlags withSuper​(boolean v)
        Treat superclass methods specially when invoked by the invokespecial instruction.

        Особо обрабатывайте методы суперкласса, когда они вызываются инструкцией invokespecial.

        Применимо к : class

        Parameters:
        v - as super
        Returns:
        flags
      • isSynchronized

        public boolean isSynchronized()
        Declared synchronized; invocation is wrapped by a monitor use.

        Заявлен как синхронизированный; вызов завершается использованием монитора.

        Применимо к : method

        Returns:
        is synchronized
      • withSynchronized

        public AccFlags withSynchronized​(boolean v)
        Declared synchronized; invocation is wrapped by a monitor use.

        Заявлен как синхронизированный; вызов завершается использованием монитора.

        Применимо к : method

        Parameters:
        v - as synchronized
        Returns:
        flags
      • isTransitive

        public boolean isTransitive()
        Indicates that any module which depends on the current module, implicitly declares a dependence on the module indicated by this entry.

        Указывает, что любой модуль, который зависит от текущего модуля, неявно объявляет зависимость от модуля, указанного в этой записи.

        Применимо к : module requires

        Returns:
        is transitive
      • withTransitive

        public AccFlags withTransitive​(boolean v)
        Indicates that any module which depends on the current module, implicitly declares a dependence on the module indicated by this entry.

        Указывает, что любой модуль, который зависит от текущего модуля, неявно объявляет зависимость от модуля, указанного в этой записи.

        Применимо к : module requires

        Parameters:
        v - as transitive
        Returns:
        flags
      • isBridge

        public boolean isBridge()
        A bridge method, generated by the compiler.

        Метод моста, созданный компилятором.

        Применимо к : method


        https://www.baeldung.com/java-type-erasure

        4.1. Bridge Methods

        To solve the edge case above, the compiler sometimes creates a bridge method. This is a synthetic method created by the Java compiler while compiling a class or interface that extends a parameterized class or implements a parameterized interface where method signatures may be slightly different or ambiguous.

        In our example above, the Java compiler preserves polymorphism of generic types after erasure by ensuring no method signature mismatch between IntegerStack‘s push(Integer) method and Stack‘s push(Object) method.

        Hence, the compiler creates a bridge method here:

         public class IntegerStack extends Stack {
             // Bridge method generated by the compiler
        
             public void push(Object value) {
                 push((Integer)value);
             }
        
             public void push(Integer value) {
                 super.push(value);
             }
         }
         

        Consequently, Stack class's push method after type erasure, delegates to the original push method of IntegerStack class.

        Returns:
        is bridge
      • withBridge

        public AccFlags withBridge​(boolean v)
        A bridge method, generated by the compiler.

        Метод моста, созданный компилятором.

        Применимо к : method

        Parameters:
        v - as bridge
        Returns:
        flags
        See Also:
        isBridge()
      • isStaticPhase

        public boolean isStaticPhase()
        Indicates that this dependence is mandatory in the static phase, i.e., at compile time, but is optional in the dynamic phase, i.e., at run time.

        Указывает, что эта зависимость обязательна в статической фазе, то есть во время компиляции, но необязательна в динамической фазе, то есть во время выполнения.

        Применимо к : module requires

        Returns:
        is static phase
      • withStaticPhase

        public AccFlags withStaticPhase​(boolean v)
        Indicates that this dependence is mandatory in the static phase, i.e., at compile time, but is optional in the dynamic phase, i.e., at run time.

        Указывает, что эта зависимость обязательна в статической фазе, то есть во время компиляции, но необязательна в динамической фазе, то есть во время выполнения.

        Применимо к : module requires

        Parameters:
        v - as static phase
        Returns:
        flags
      • isVolatile

        public boolean isVolatile()
        Declared volatile; cannot be cached.

        Объявлен летучим; не может быть кэширован.

        Применимо к : field

        Returns:
        is volatile
      • withVolatile

        public AccFlags withVolatile​(boolean v)
        Declared volatile; cannot be cached.

        Объявлен летучим; не может быть кэширован.

        Применимо к : field

        Parameters:
        v - as volatile
        Returns:
        flags
      • isVarArgs

        public boolean isVarArgs()
        Declared with variable number of arguments.

        Заявлен с переменным количеством аргументов.

        Применимо к : method

        Returns:
        is var args
      • withVarArgs

        public AccFlags withVarArgs​(boolean v)
        Declared with variable number of arguments.

        Заявлен с переменным количеством аргументов.

        Применимо к : method

        Parameters:
        v - as var args
        Returns:
        flags
      • isTransient

        public boolean isTransient()
        Declared transient; not written or read by a persistent object manager.

        Заявлен переходный; не записывается и не читается постоянным диспетчером объектов.

        Применимо к : field

        Returns:
        is transient
      • withTransient

        public AccFlags withTransient​(boolean v)
        Declared transient; not written or read by a persistent object manager.

        Заявлен переходный; не записывается и не читается постоянным диспетчером объектов.

        Применимо к : field

        Parameters:
        v - as transient
        Returns:
        flags
      • isNative

        public boolean isNative()
        Declared native; implemented in a language other than the Java programming language.

        Заявлен родным; реализован на языке, отличном от языка программирования Java.

        Применимо к : method

        Returns:
        is native
      • withNative

        public AccFlags withNative​(boolean v)
        Declared native; implemented in a language other than the Java programming language.

        Заявлен родным; реализован на языке, отличном от языка программирования Java.

        Применимо к : method

        Parameters:
        v - as native
        Returns:
        flags
      • isInterface

        public boolean isInterface()
        Is an interface, not a class.

        Это интерфейс, а не класс.

        Применимо к : class

        Returns:
        is interface
      • withInterface

        public AccFlags withInterface​(boolean v)
        set Is an interface, not a class.

        Это интерфейс, а не класс.

        Применимо к : class

        Parameters:
        v - as interface
        Returns:
        flags
      • isAbstract

        public boolean isAbstract()
        Declared abstract; must not be instantiated.

        Заявленная abstract; не должен быть создан

        Применимо к : class, method

        Returns:
        is abstract
      • withAbstract

        public AccFlags withAbstract​(boolean v)
        set abstract

        Заявленная abstract; не должен быть создан

        Применимо к : class, method

        Parameters:
        v - Declared abstract; must not be instantiated.
        Returns:
        flags
      • isStrict

        public boolean isStrict()
        Declared strictfp; floating-point mode is FP-strict.

        Заявлен strictfp; режим с плавающей запятой является FP-строгим.

        Применимо к : method

        Returns:
        is strict
      • withStrict

        public AccFlags withStrict​(boolean v)
        Declared strictfp; floating-point mode is FP-strict.

        Заявлен strictfp; режим с плавающей запятой является FP-строгим.

        Применимо к : method

        Parameters:
        v - as strict
        Returns:
        flags
      • isSynthetic

        public boolean isSynthetic()
        Declared synthetic; not present in the source code.

        Заявлен синтетический; отсутствует в исходном коде.

        Применимо к : class, field, method, parameter, module

        Returns:
        is synthetic
      • withSynthetic

        public AccFlags withSynthetic​(boolean v)
        set Declared synthetic; not present in the source code.

        Заявлен синтетический; отсутствует в исходном коде.

        Применимо к : class, field, method, parameter, module

        Parameters:
        v - as synthetic
        Returns:
        flags
      • isAnnotation

        public boolean isAnnotation()
        Declared as an annotation type.

        Объявлен как тип аннотации.

        Применимо к : class

        Returns:
        is annotation
      • withAnnotation

        public AccFlags withAnnotation​(boolean v)
        set declared as an annotation type.

        Объявлен как тип аннотации.

        Применимо к : class

        Parameters:
        v - Declared as an annotation type.
        Returns:
        flags
      • isEnum

        public boolean isEnum()
        Declared as an enum type.

        Объявлен как перечисляемый тип.

        Применимо к : class(?), field inner

        Returns:
        is enum
      • withEnum

        public AccFlags withEnum​(boolean v)
        Declared as an enum type.

        Объявлен как перечисляемый тип.

        Применимо к : class(?), field inner

        Parameters:
        v - as enum
        Returns:
        flags
      • isMandated

        public boolean isMandated()
        Indicates that the formal parameter was implicitly declared in source code, according to the specification of the language in which the source code was written (JLS §13.1). (The formal parameter is mandated by a language specification, so all compilers for the language must emit it.)

        Указывает, что формальный параметр был неявно объявлен в исходном коде в соответствии со спецификацией языка, на котором был написан исходный код (JLS §13.1). (Формальный параметр требуется спецификацией языка, поэтому все компиляторы языка должны его выдавать.)

        Применимо к : field, method, parameter, module, module

        Returns:
        is mandated
      • withMandated

        public AccFlags withMandated​(boolean v)
        Indicates that the formal parameter was implicitly declared in source code, according to the specification of the language in which the source code was written (JLS §13.1). (The formal parameter is mandated by a language specification, so all compilers for the language must emit it.)

        Указывает, что формальный параметр был неявно объявлен в исходном коде в соответствии со спецификацией языка, на котором был написан исходный код (JLS §13.1). (Формальный параметр требуется спецификацией языка, поэтому все компиляторы языка должны его выдавать.)

        Применимо к : field, method, parameter, module, module

        Parameters:
        v - as mandated
        Returns:
        flags
      • isModule

        public boolean isModule()
        Is a module, not a class or interface.

        Это модуль, а не класс или интерфейс.

        Применимо к : class

        Returns:
        is module
      • withModule

        public AccFlags withModule​(boolean v)
        set a module, not a class or interface.

        Это модуль, а не класс или интерфейс.

        Применимо к : class

        Parameters:
        v - as module
        Returns:
        flags
      • isRecord

        public boolean isRecord()
      • withRecord

        public AccFlags withRecord​(boolean v)
      • isDeprecated

        public boolean isDeprecated()
      • withDeprecated

        public AccFlags withDeprecated​(boolean v)