@Override
public void annotation(Annotation annotation) {
Collection<Element> properties = Create.set();
if (Deprecated.class.getName().equals(annotation.getName().getFQN())) {
if (memberEnd)
clazz.setDeprecated(true);
else
last.setDeprecated(true);
return;
}
for (String key : annotation.keySet()) {
StringBuilder sb = new StringBuilder();
sb.append(key);
sb.append('=');
toString(sb, annotation.get(key));
properties.add(new Element(Type.PROPERTY, sb.toString(), null, CHANGED, CHANGED, null));
}
if (memberEnd) {
members.add(new Element(Type.ANNOTATED, annotation.getName().getFQN(), properties, CHANGED,
CHANGED, null));
if (ProviderType.class.getName().equals(annotation.getName().getFQN())) {
provider.set(true);
} else if (ConsumerType.class.getName().equals(annotation.getName().getFQN())) {
provider.set(false);
}
} else if (last != null)
annotations.add(last, new Element(Type.ANNOTATED, annotation.getName().getFQN(), properties,
CHANGED, CHANGED, null));
}