private void addAnnotation(ServiceAnnotationMetaData annotation, Element mbean) { Element a = document.createElement("annotation"); a.setTextContent(annotation.getAnnotation()); mbean.appendChild(a); }
/** * Create a new annotation meta data * @param ann - the annotation declaration */ public ServiceAnnotationMetaData(String ann) { super(); setAnnotation(ann); }
String anString = sam.getAnnotation(); if (anString.startsWith(MOCLASS_ANNOTATION)) ManagementObjectClass moc = (ManagementObjectClass)sam.getAnnotationInstance(loader); moClass = moc.code(); log.debug("Using alternate class '" + moClass + "' for class " + originalClass);
public Annotation getAnnotationInstance(ClassLoader cl) { try { String annString = annotation; if (replace) { annString = StringPropertyReplacer.replaceProperties(annString); } if (cl == null) { cl = Thread.currentThread().getContextClassLoader(); } ann = (Annotation)AnnotationCreator.createAnnotation(annString, cl); } catch (Exception e) { throw new RuntimeException("Error creating annotation for " + annotation, e); } catch(TokenMgrError e) { throw new RuntimeException("Error creating annotation for " + annotation, e); } return ann; }
ServiceAnnotationMetaData amd = new ServiceAnnotationMetaData(ann); annotations.add(amd);
public Annotation getAnnotationInstance(ClassLoader cl) { try { String annString = annotation; if (replace) { annString = StringPropertyReplacer.replaceProperties(annString); } if (cl == null) { cl = Thread.currentThread().getContextClassLoader(); } ann = (Annotation)AnnotationCreator.createAnnotation(annString, cl); } catch (Exception e) { throw new RuntimeException("Error creating annotation for " + annotation, e); } catch(TokenMgrError e) { throw new RuntimeException("Error creating annotation for " + annotation, e); } return ann; }
ServiceAnnotationMetaData amd = new ServiceAnnotationMetaData(ann); annotations.add(amd);
private void addAnnotation(ServiceAnnotationMetaData annotation, Element mbean) { Element a = document.createElement("annotation"); a.setTextContent(annotation.getAnnotation()); mbean.appendChild(a); }
/** * Create a new annotation meta data * @param ann - the annotation declaration */ public ServiceAnnotationMetaData(String ann) { super(); setAnnotation(ann); }