/** * Resolves annotations based on inheritance for the given node and element. * * @param node manifest node * @param element the element annotations are being resolved for * @return annotations */ protected IApiAnnotations resolveAnnotations(ManifestNode node, IElementDescriptor element) { int vis = resolveVisibility(node); int res = RestrictionModifiers.NO_RESTRICTIONS; if (node.element.equals(element)) { res = node.restrictions; } if (ApiPlugin.DEBUG_API_DESCRIPTION) { StringBuilder buffer = new StringBuilder(); buffer.append("Resolved annotations for manifest node: "); //$NON-NLS-1$ buffer.append(node); buffer.append(" to be: "); //$NON-NLS-1$ buffer.append(VisibilityModifiers.getVisibilityName(vis)); buffer.append(" "); //$NON-NLS-1$ buffer.append(RestrictionModifiers.getRestrictionText(res)); System.out.println(buffer.toString()); } return new ApiAnnotations(vis, res); }