/** {@inheritDoc} */ public Collection<Modifier> getModifiers() { if (modifiers == null) { modifiers = EnumSet.noneOf(Modifier.class); long flags = AptEnv.getFlags(sym); if (0 != (flags & Flags.PUBLIC)) modifiers.add(PUBLIC); if (0 != (flags & Flags.PROTECTED)) modifiers.add(PROTECTED); if (0 != (flags & Flags.PRIVATE)) modifiers.add(PRIVATE); if (0 != (flags & Flags.ABSTRACT)) modifiers.add(ABSTRACT); if (0 != (flags & Flags.STATIC)) modifiers.add(STATIC); if (0 != (flags & Flags.FINAL)) modifiers.add(FINAL); if (0 != (flags & Flags.TRANSIENT)) modifiers.add(TRANSIENT); if (0 != (flags & Flags.VOLATILE)) modifiers.add(VOLATILE); if (0 != (flags & Flags.SYNCHRONIZED)) modifiers.add(SYNCHRONIZED); if (0 != (flags & Flags.NATIVE)) modifiers.add(NATIVE); if (0 != (flags & Flags.STRICTFP)) modifiers.add(STRICTFP); } return modifiers; }
/** * {@inheritDoc} * * <p>ParameterDeclarationImpl overrides this implementation. */ public int hashCode() { return sym.hashCode() + env.hashCode(); }
/** * Tests whether this is a symbol that should never be seen by clients, such as a synthetic class. * Note that a class synthesized by the compiler may not be flagged as synthetic: see bugid * 4959932. */ private static boolean unwanted(Symbol s) { return AptEnv.hasFlag(s, Flags.SYNTHETIC) || (s.kind == TYP && !DeclarationMaker.isJavaIdentifier(s.name.toString())); }