Package javassist.bytecode

Examples of javassist.bytecode.AnnotationsAttribute.addAnnotation()


                  {
                     visible = new AnnotationsAttribute(mi.getConstPool(), AnnotationsAttribute.visibleTag);
                     mi.addAttribute(visible);
                  }
                  changed = true;
                  visible.addAnnotation(info);
               }
            }
         }

         CtField[] fields = clazz.getDeclaredFields();
View Full Code Here


                  {
                     invisible = new AnnotationsAttribute(mi.getConstPool(), AnnotationsAttribute.invisibleTag);
                     mi.addAttribute(invisible);
                  }
                  changed = true;
                  invisible.addAnnotation(info);
               }
               else
               {
                  AnnotationsAttribute visible = (AnnotationsAttribute) mi.getAttribute(AnnotationsAttribute.visibleTag);
                  if (visible == null)
View Full Code Here

                  {
                     visible = new AnnotationsAttribute(mi.getConstPool(), AnnotationsAttribute.visibleTag);
                     mi.addAttribute(visible);
                  }
                  changed = true;
                  visible.addAnnotation(info);
               }
            }
         }
      }
      return changed;
View Full Code Here

                        // add GoGo descriptor for this shell command
                        AnnotationsAttribute annotationsAttribute = new AnnotationsAttribute(constPool, AnnotationsAttribute.visibleTag);
                        Annotation annotation = new Annotation(Descriptor.class.getName(), constPool);
                        annotation.addMemberValue("value", new StringMemberValue(commands.get(name), constPool));
                        annotationsAttribute.addAnnotation(annotation);
                        ctMethod.getMethodInfo().addAttribute(annotationsAttribute);
                    }
                }
            }
View Full Code Here

    javassist.bytecode.annotation.Annotation zkCompAnnotation = new javassist.bytecode.annotation.Annotation(
        "org.zkoss.cdi.inject.ComponentId", cp);
    zkCompAnnotation.addMemberValue("value", new StringMemberValue(field
        .getName(), cp));
   
    attr.addAnnotation(producesAnnotation);
    attr.addAnnotation(zkScopedAnnotation);
    attr.addAnnotation(zkCompAnnotation);
    mnew.getMethodInfo().addAttribute(attr);
   
    mainClass.addMethod(mnew);
View Full Code Here

        "org.zkoss.cdi.inject.ComponentId", cp);
    zkCompAnnotation.addMemberValue("value", new StringMemberValue(field
        .getName(), cp));
   
    attr.addAnnotation(producesAnnotation);
    attr.addAnnotation(zkScopedAnnotation);
    attr.addAnnotation(zkCompAnnotation);
    mnew.getMethodInfo().addAttribute(attr);
   
    mainClass.addMethod(mnew);
  }
View Full Code Here

    zkCompAnnotation.addMemberValue("value", new StringMemberValue(field
        .getName(), cp));
   
    attr.addAnnotation(producesAnnotation);
    attr.addAnnotation(zkScopedAnnotation);
    attr.addAnnotation(zkCompAnnotation);
    mnew.getMethodInfo().addAttribute(attr);
   
    mainClass.addMethod(mnew);
  }
View Full Code Here

      StringMemberValue strValue4 = new StringMemberValue(constantPool);
      strValue4.setValue(epInfo.getNamespace());
      annotation.addMemberValue("targetNamespace", strValue4);

      attribute.addAnnotation(annotation);

      Annotation annotation2 = new Annotation("javax.xml.ws.ServiceMode",
          constantPool);
      EnumMemberValue enumValue = new EnumMemberValue(constantPool);
      enumValue.setType("javax.xml.ws.Service$Mode");
View Full Code Here

          constantPool);
      EnumMemberValue enumValue = new EnumMemberValue(constantPool);
      enumValue.setType("javax.xml.ws.Service$Mode");
      enumValue.setValue("MESSAGE");
      annotation2.addMemberValue("value", enumValue);
      attribute.addAnnotation(annotation2);

      if (epInfo.isAddressing() && JBossDeployerUtil.getWSImpl().equals(JBossDeployerUtil.WSIMPL_CXF))
      {
        Annotation annotation3 = new Annotation("javax.xml.ws.soap.Addressing", constantPool);
        BooleanMemberValue boolEnabled = new BooleanMemberValue(constantPool);
View Full Code Here

        boolEnabled.setValue(true);
        BooleanMemberValue boolRequired = new BooleanMemberValue(constantPool);
        boolRequired.setValue(true);
        annotation3.addMemberValue("enabled", boolEnabled);
        annotation3.addMemberValue("required", boolEnabled);
        attribute.addAnnotation(annotation3);
      }

      if (includeHandlers)
      {
        final Annotation handlerChainAnnotation = new Annotation("javax.jws.HandlerChain", constantPool) ;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.