コード例 #1
0
 protected void writeHandlerConfig(String className, JDefinedClass cls, WsimportOptions options) {
   Element e = options.getHandlerChainConfiguration();
   if (e == null) return;
   JAnnotationUse handlerChainAnn = cls.annotate(cm.ref(HandlerChain.class));
   NodeList nl = e.getElementsByTagNameNS("http://java.sun.com/xml/ns/javaee", "handler-chain");
   if (nl.getLength() > 0) {
     String fName = getHandlerConfigFileName(className);
     handlerChainAnn.param("file", fName);
     generateHandlerChainFile(e, className);
   }
 }
コード例 #2
0
 JDefinedClass getClazz(ClassType t) {
   if (clazz != null) return clazz;
   try {
     JCodeModel codeModel = Ring.get(JCodeModel.class);
     clazz = codeModel._class(name, t);
     clazz.hide();
     return clazz;
   } catch (JClassAlreadyExistsException e) {
     return e.getExistingClass();
   }
 }