Provide static utility methods for parsing AST member modifiers, e.g. public/protected/private, static, final, etc.
| Type | Name and description |
|---|---|
static boolean |
matchesAnyModifiers(Integer actualModifiers, List<Integer> expectedModifiersList) |
static boolean |
matchesModifiers(Integer actualModifiers, Integer expectedModifiers)Return true only if the actualModifiers int value contains all of the bits (enabled) from the expectedModifiers |
static int |
parseModifiers(String modifiersString)Parse a group of whitespace-delimited modifier names |
static List<Integer> |
parseModifiersList(String modifiersString)Parse comma-separated list of modifier groups |
Return true only if the actualModifiers int value contains all of the bits (enabled) from the expectedModifiers
actualModifiers - - the full actual modifiers; an int value of the OR-ed modifiers (values from Opcodes)expectedModifiers - - the modifiers to check against; an int value of the OR-ed modifiers (values from Opcodes)Parse a group of whitespace-delimited modifier names
modifiersString - - a group of whitespace-delimited modifier namesParse comma-separated list of modifier groups
modifiersString - - comma-separated list of modifier groups;
each group is a list of whitespace-delimited modifier names;
e.g. "public, protected static, protected final"