Hi Johannes
1.
Yes, it is a bit set. You should use japa.parser.ast.body.ModifierSet
to get the individual modifiers. For example:
int modifiers = classDecl.getModifiers();
if (ModifierSet.isPrivate(modifiers)) {
System.out.println("It is private");
}
Check ModifierSet javadoc for more information.
2.
By while you have only 2 options:
- use "instanceof" to check which instance the TypeDeclaration is
- use a visitor, the visitor pattern will make you land in the right
implementation of TypeDeclaration without the instanceof
regards,
--
Júlio Vilmar Gesser