Package javassist.bytecode.annotation

Examples of javassist.bytecode.annotation.Annotation


/*      */     }
/*      */   }
/*      */
/*      */   private void undeployPrecedence(AnnotationsAttribute visible, ClassFile cf) throws Exception
/*      */   {
/*  431 */     Annotation info = visible.getAnnotation(Precedence.class.getName());
/*  432 */     if (info != null)
/*      */     {
/*  434 */       this.manager.removePrecedence(cf.getName());
/*      */     }
/*      */   }
View Full Code Here


/*  442 */     while (methods.hasNext())
/*      */     {
/*  444 */       MethodInfo minfo = (MethodInfo)methods.next();
/*  445 */       AnnotationsAttribute mgroup = (AnnotationsAttribute)minfo.getAttribute("RuntimeVisibleAnnotations");
/*  446 */       if (mgroup != null) {
/*  447 */         Annotation binfo = mgroup.getAnnotation(Bind.class.getName());
/*  448 */         if (binfo != null) {
/*  449 */           Bind binding = (Bind)AnnotationProxy.createProxy(binfo, Bind.class);
/*  450 */           String pointcutString = binding.pointcut();
/*  451 */           String cflow = binding.cflow();
/*  452 */           if ((cflow == null) || (cflow.trim().equals(""))) cflow = null;
View Full Code Here

/*  510 */     while (methods.hasNext())
/*      */     {
/*  512 */       MethodInfo minfo = (MethodInfo)methods.next();
/*  513 */       AnnotationsAttribute mgroup = (AnnotationsAttribute)minfo.getAttribute("RuntimeVisibleAnnotations");
/*  514 */       if (mgroup != null) {
/*  515 */         Annotation binfo = mgroup.getAnnotation(Bind.class.getName());
/*  516 */         if (binfo == null)
/*      */           continue;
/*  518 */         String adviceName = cf.getName() + "." + minfo.getName();
/*  519 */         this.manager.removeInterceptorFactory(adviceName);
/*  520 */         String name = getAspectMethodBindingName(cf, minfo);
View Full Code Here

/*      */   }
/*      */
/*      */   private void deployInterceptorBindings(AnnotationsAttribute visible, ClassFile cf, InterceptorFactory factory)
/*      */     throws Exception
/*      */   {
/*  536 */     Annotation binfo = visible.getAnnotation(Bind.class.getName());
/*  537 */     if (binfo == null) return;
/*  538 */     Bind bind = (Bind)AnnotationProxy.createProxy(binfo, Bind.class);
/*  539 */     String pointcutString = bind.pointcut();
/*  540 */     String cflow = bind.cflow();
/*  541 */     if ((cflow == null) || (cflow.trim().equals(""))) cflow = null;
View Full Code Here

/*      */   }
/*      */
/*      */   private void undeployInterceptorBindings(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  560 */     Annotation binfo = visible.getAnnotation(Bind.class.getName());
/*  561 */     if (binfo == null) return;
/*      */
/*  563 */     String name = cf.getName();
/*  564 */     this.manager.removePointcut(name);
/*  565 */     this.manager.removeBinding(name);
View Full Code Here

/*  573 */     while (fields.hasNext())
/*      */     {
/*  575 */       FieldInfo finfo = (FieldInfo)fields.next();
/*  576 */       AnnotationsAttribute mgroup = (AnnotationsAttribute)finfo.getAttribute("RuntimeVisibleAnnotations");
/*  577 */       if (mgroup != null) {
/*  578 */         Annotation binfo = mgroup.getAnnotation(PointcutDef.class.getName());
/*  579 */         if (binfo != null) {
/*  580 */           PointcutDef pdef = (PointcutDef)AnnotationProxy.createProxy(binfo, PointcutDef.class);
/*      */
/*  582 */           PointcutExpression pointcut = new PointcutExpression(getPointcutName(cf, finfo), pdef.value());
/*      */
View Full Code Here

/*  592 */     while (fields.hasNext())
/*      */     {
/*  594 */       FieldInfo finfo = (FieldInfo)fields.next();
/*  595 */       AnnotationsAttribute mgroup = (AnnotationsAttribute)finfo.getAttribute("RuntimeVisibleAnnotations");
/*  596 */       if (mgroup != null) {
/*  597 */         Annotation binfo = mgroup.getAnnotation(PointcutDef.class.getName());
/*  598 */         if (binfo != null)
/*  599 */           this.manager.removePointcut(getPointcutName(cf, finfo));
/*      */       }
/*      */     }
/*      */   }
View Full Code Here

/*  612 */     while (methods.hasNext())
/*      */     {
/*  614 */       MethodInfo minfo = (MethodInfo)methods.next();
/*  615 */       AnnotationsAttribute mgroup = (AnnotationsAttribute)minfo.getAttribute("RuntimeVisibleAnnotations");
/*  616 */       if (mgroup != null) {
/*  617 */         Annotation binfo = mgroup.getAnnotation(Mixin.class.getName());
/*  618 */         if (binfo == null)
/*      */         {
/*      */           continue;
/*      */         }
/*      */
/*  631 */         MemberValue mv = binfo.getMemberValue("target");
/*  632 */         String target = mv != null ? ((ClassMemberValue)mv).getValue() : "java.lang.Class";
/*  633 */         mv = binfo.getMemberValue("typeExpression");
/*  634 */         String typeExpression = mv != null ? ((StringMemberValue)mv).getValue() : "";
/*      */
/*  636 */         mv = binfo.getMemberValue("interfaces");
/*  637 */         MemberValue[] values = ((ArrayMemberValue)mv).getValue();
/*  638 */         String[] interfaces = new String[values.length];
/*  639 */         for (int i = 0; i < values.length; i++) interfaces[i] = ((ClassMemberValue)values[i]).getValue();
/*      */
/*  641 */         mv = binfo.getMemberValue("isTransient");
/*  642 */         boolean isTransient = mv != null ? ((BooleanMemberValue)mv).getValue() : true;
/*      */
/*  644 */         String name = cf.getName() + "." + minfo.getName();
/*      */
/*  646 */         InterfaceIntroduction intro = null;
View Full Code Here

/*  731 */     while (methods.hasNext())
/*      */     {
/*  733 */       MethodInfo minfo = (MethodInfo)methods.next();
/*  734 */       AnnotationsAttribute mgroup = (AnnotationsAttribute)minfo.getAttribute("RuntimeVisibleAnnotations");
/*  735 */       if (mgroup != null) {
/*  736 */         Annotation binfo = mgroup.getAnnotation(Mixin.class.getName());
/*  737 */         if (binfo == null)
/*      */           continue;
/*  739 */         String name = cf.getName() + "." + minfo.getName();
/*  740 */         this.manager.removeInterfaceIntroduction(name);
/*      */       }
View Full Code Here

/*  748 */     while (fields.hasNext())
/*      */     {
/*  750 */       FieldInfo finfo = (FieldInfo)fields.next();
/*  751 */       AnnotationsAttribute mgroup = (AnnotationsAttribute)finfo.getAttribute("RuntimeVisibleAnnotations");
/*  752 */       if (mgroup != null) {
/*  753 */         Annotation binfo = mgroup.getAnnotation(Introduction.class.getName());
/*  754 */         if (binfo == null)
/*      */         {
/*      */           continue;
/*      */         }
/*      */
/*  766 */         MemberValue mv = binfo.getMemberValue("target");
/*  767 */         String target = mv != null ? ((ClassMemberValue)mv).getValue() : "java.lang.Class";
/*      */
/*  769 */         mv = binfo.getMemberValue("typeExpression");
/*  770 */         String typeExpression = mv != null ? ((StringMemberValue)mv).getValue() : "";
/*      */
/*  772 */         mv = binfo.getMemberValue("interfaces");
/*  773 */         MemberValue[] values = ((ArrayMemberValue)mv).getValue();
/*  774 */         String[] interfaces = new String[values.length];
/*  775 */         for (int i = 0; i < values.length; i++) interfaces[i] = ((ClassMemberValue)values[i]).getValue();
/*      */
/*  777 */         String name = cf.getName() + "." + finfo.getName();
View Full Code Here

TOP

Related Classes of javassist.bytecode.annotation.Annotation

Copyright © 2018 www.massapicom. 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.