public RetentionPolicy getRetention(Attribute.Compound a) {
return getRetention(a.type.tsym);
}
public RetentionPolicy getRetention(Symbol sym) {
RetentionPolicy vis = RetentionPolicy.CLASS; // the default
Attribute.Compound c = sym.attribute(syms.retentionType.tsym);
if (c != null) {
Attribute value = c.member(names.value);
if (value != null && value instanceof Attribute.Enum) {
Name levelName = ((Attribute.Enum)value).value.name;