Package javassist.bytecode

Examples of javassist.bytecode.AnnotationsAttribute.addAnnotation()


      {
        final Annotation handlerChainAnnotation = new Annotation("javax.jws.HandlerChain", constantPool) ;
        final StringMemberValue handlerValue = new StringMemberValue(constantPool) ;
        handlerValue.setValue("esb-jaxws-handlers.xml") ;
        handlerChainAnnotation.addMemberValue("file", handlerValue) ;
        attribute.addAnnotation(handlerChainAnnotation) ;
      }
     
      seiClass.getClassFile().addAttribute(attribute);
     
      final String siClassName = ServiceInvoker.class.getName() ;
View Full Code Here


    // Create annotation if it does not exist
    Annotation a = new Annotation(EnhancedClassFile.class.getName(), constPool);

    // Replace annotation
    annoAttr.addAnnotation(a);

    // Replace annotation attribute
    classFile.addAttribute(annoAttr);
  }
View Full Code Here

    // Update copyright
    enhanceMemberValue(a, "copyright", componentCopyright, overrideComponentCopyright,
            ResourceMetaDataFactory.getDefaultCopyright(aClazz), constPool, aReportData, aClazz);

    // Replace annotation
    annoAttr.addAnnotation(a);

    // Replace annotation attribute
    classFile.addAttribute(annoAttr);
  }
View Full Code Here

              if (a.getMemberValue("description") == null) {
                a.addMemberValue("description", new StringMemberValue(pdesc, aCtClazz
                        .getClassFile().getConstPool()));
                getLog().info("Enhanced description of " + type + " [" + pname + "]");
                // Replace updated annotation
                annoAttr.addAnnotation(a);
              } else {
                // Extract configuration parameter information from the uimaFIT annotation
                // We only want to override if the description is not set yet.
                getLog().info("Not overwriting description of " + type + " [" + pname + "] ");
              }
View Full Code Here

    EnumMemberValue enumValue = new EnumMemberValue(cp);
    enumValue.setType("org.springframework.context.annotation.ScopedProxyMode");
    enumValue.setValue("TARGET_CLASS");
    scopeAnnotation.addMemberValue("proxyMode", enumValue);
    scopeAnnotation.addMemberValue("value", new StringMemberValue("idspace", cp));
    attr1.addAnnotation(beanAnnotation);
    attr1.addAnnotation(lazyAnnotation);
    attr1.addAnnotation(scopeAnnotation);
    mnew.getMethodInfo().addAttribute(attr1);
    mnew.getMethodInfo().addAttribute(attr1);
    mnew.getMethodInfo().addAttribute(attr1);
View Full Code Here

    enumValue.setType("org.springframework.context.annotation.ScopedProxyMode");
    enumValue.setValue("TARGET_CLASS");
    scopeAnnotation.addMemberValue("proxyMode", enumValue);
    scopeAnnotation.addMemberValue("value", new StringMemberValue("idspace", cp));
    attr1.addAnnotation(beanAnnotation);
    attr1.addAnnotation(lazyAnnotation);
    attr1.addAnnotation(scopeAnnotation);
    mnew.getMethodInfo().addAttribute(attr1);
    mnew.getMethodInfo().addAttribute(attr1);
    mnew.getMethodInfo().addAttribute(attr1);
    mainClass.addMethod(mnew);
View Full Code Here

    enumValue.setValue("TARGET_CLASS");
    scopeAnnotation.addMemberValue("proxyMode", enumValue);
    scopeAnnotation.addMemberValue("value", new StringMemberValue("idspace", cp));
    attr1.addAnnotation(beanAnnotation);
    attr1.addAnnotation(lazyAnnotation);
    attr1.addAnnotation(scopeAnnotation);
    mnew.getMethodInfo().addAttribute(attr1);
    mnew.getMethodInfo().addAttribute(attr1);
    mnew.getMethodInfo().addAttribute(attr1);
    mainClass.addMethod(mnew);
    methodCounter += 1;
View Full Code Here

    ConstPool cPool = cFile.getConstPool();
    AnnotationsAttribute attr = new AnnotationsAttribute(cPool,
        AnnotationsAttribute.visibleTag);
    javassist.bytecode.annotation.Annotation configurationAnnotation = new javassist.bytecode.annotation.Annotation(
        "org.springframework.context.annotation.Configuration", cPool);
    attr.addAnnotation(configurationAnnotation);
    cFile.addAttribute(attr);
    return mainClass;
  }

View Full Code Here

        }
       
        final javassist.bytecode.annotation.Annotation copy = toJavassistAnnotation(annotation);
       
       
        attribute.addAnnotation(copy);
       
        classFile.addAttribute(attribute);
       
    }
   
View Full Code Here

            attribute = new AnnotationsAttribute(getConstPool(), AnnotationsAttribute.visibleTag);
        }

        final javassist.bytecode.annotation.Annotation copy = toJavassistAnnotation(annotation);

        attribute.addAnnotation(copy);

        methodInfo.addAttribute(attribute);

    }
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.