/** * Insert the element produce by {@link #getAnnotationsElement(Annotated)} * into the specified {@link Element}. If the annotation set is empty this * does nothing - this is to prevent copy and paste code of the style 'if * there are annotations add...' * * @param element * {@link Element} where to inject annotations * @param annotated * {@link Annotated} from where to find annotations */ public static void injectAnnotations(Element element, Annotated<?> annotated) { if (!annotated.getAnnotations().isEmpty()) { element.addContent(getAnnotationsElement(annotated)); } }
/** * Insert the element produce by {@link #getAnnotationsElement(Annotated)} * into the specified {@link Element}. If the annotation set is empty this * does nothing - this is to prevent copy and paste code of the style 'if * there are annotations add...' * * @param element * {@link Element} where to inject annotations * @param annotated * {@link Annotated} from where to find annotations */ public static void injectAnnotations(Element element, Annotated<?> annotated) { if (!annotated.getAnnotations().isEmpty()) { element.addContent(getAnnotationsElement(annotated)); } }
/** * Insert the element produce by {@link #getAnnotationsElement(Annotated)} * into the specified {@link Element}. If the annotation set is empty this * does nothing - this is to prevent copy and paste code of the style 'if * there are annotations add...' * * @param element * {@link Element} where to inject annotations * @param annotated * {@link Annotated} from where to find annotations */ @Deprecated public static void injectAnnotations(Element element, Annotated<?> annotated) { if (!annotated.getAnnotations().isEmpty()) { element.addContent(getAnnotationsElement(annotated)); } }