Package org.openrewrite.java.tree
Enum Class Flag
- All Implemented Interfaces:
Serializable,Comparable<Flag>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final long -
Method Summary
Modifier and TypeMethodDescriptionbitMapToFlags(long flagsBitMap) Convert the Java language specification's access flags bitmap into a set of Flag enumerations.static longflagsToBitMap(@Nullable Set<Flag> flags) Converts a set of flag enumerations into the Java Language Specification's access_flags bitmaplongstatic booleanstatic FlagReturns the enum constant of this class with the specified name.static Flag[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Public
-
Private
-
Protected
-
Static
-
Final
-
Synchronized
-
Volatile
-
Transient
-
Native
-
Interface
-
Abstract
-
Strictfp
-
HasInit
Flag is set for a variable symbol if the variable's definition has an initializer part. -
Varargs
-
Union
-
Default
-
SignaturePolymorphic
-
PotentiallyAmbiguous
-
-
Field Details
-
VALID_CLASS_FLAGS
public static final long VALID_CLASS_FLAGS -
VALID_FLAGS
public static final long VALID_FLAGS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getBitMask
public long getBitMask() -
bitMapToFlags
Convert the Java language specification's access flags bitmap into a set of Flag enumerations.- Parameters:
flagsBitMap- The flag from the Javac symbol into a set of rewrite's Flag enum- Returns:
- A set of Flag enums.
-
flagsToBitMap
Converts a set of flag enumerations into the Java Language Specification's access_flags bitmap- Parameters:
flags- A set of Flag enumerations- Returns:
- The bitmask representation of those flags.
-
hasFlags
- Parameters:
flagsBitMap- Java Language Specification's access flags bitmapflags- A set of flags to test- Returns:
- Returns true if the access flags bitmap contains all the flags passed to this method.
-