Package javassist.bytecode.annotation

Examples of javassist.bytecode.annotation.Annotation


/*     */   }
/*     */
/*     */   public static Annotation createAnnotationInfo(ClassPool pool, ConstPool cp, ASTAnnotation node) throws Exception
/*     */   {
/* 166 */     CtClass annotation = pool.get(node.getIdentifier());
/* 167 */     Annotation info = new Annotation(cp, annotation);
/* 168 */     AnnotationInfoCreator creator = new AnnotationInfoCreator(pool, cp, info);
/* 169 */     if (node.jjtGetNumChildren() > 0)
/*     */     {
/* 171 */       node.jjtGetChild(0).jjtAccept(creator, null);
/*     */     }
View Full Code Here


/*      */   }
/*      */
/*      */   private AspectDefinition deployAspect(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  205 */     Annotation info = visible.getAnnotation(Aspect.class.getName());
/*  206 */     if (info != null)
/*      */     {
/*  208 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("[debug] Found @Aspect in: " + cf.getName());
/*  209 */       Aspect aspect = (Aspect)AnnotationProxy.createProxy(info, Aspect.class);
/*  210 */       Scope scope = aspect.scope();
View Full Code Here

/*      */   }
/*      */
/*      */   private void undeployAspect(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  248 */     Annotation info = visible.getAnnotation(Aspect.class.getName());
/*  249 */     if (info != null)
/*      */     {
/*  251 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("Undeploying @Aspect in: " + cf.getName());
/*  252 */       this.manager.removeAspectDefinition(cf.getName());
/*      */
View Full Code Here

/*      */   }
/*      */
/*      */   private AspectDefinition deployInterceptor(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  261 */     Annotation info = visible.getAnnotation(InterceptorDef.class.getName());
/*  262 */     if (info != null)
/*      */     {
/*  264 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("Found @InterceptorDef in: " + cf.getName());
/*  265 */       Aspect aspect = (Aspect)AnnotationProxy.createProxy(info, Aspect.class);
/*  266 */       Scope scope = aspect.scope();
View Full Code Here

/*      */   }
/*      */
/*      */   private void undeployInterceptor(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  311 */     Annotation info = visible.getAnnotation(InterceptorDef.class.getName());
/*  312 */     if (info != null)
/*      */     {
/*  314 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("Undeploying @InterceptorDef in: " + cf.getName());
/*  315 */       AnnotationProxy.createProxy(info, Aspect.class);
/*      */
View Full Code Here

/*      */   }
/*      */
/*      */   private void deployDynamicCFlow(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  326 */     Annotation info = visible.getAnnotation(DynamicCFlowDef.class.getName());
/*  327 */     if (info != null)
/*      */     {
/*  329 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("Found @DynamicCFlowDef in: " + cf.getName());
/*  330 */       AnnotationProxy.createProxy(info, DynamicCFlowDef.class);
/*      */
View Full Code Here

/*      */     }
/*      */   }
/*      */
/*      */   private void undeployDynamicCFlow(AnnotationsAttribute visible, ClassFile cf) throws Exception
/*      */   {
/*  353 */     Annotation info = visible.getAnnotation(DynamicCFlowDef.class.getName());
/*  354 */     if (info != null)
/*      */     {
/*  356 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("Undeploying @DynamicCFlowDef in: " + cf.getName());
/*  357 */       String name = cf.getName();
/*  358 */       this.manager.removeDynamicCFlow(name);
View Full Code Here

/*      */   }
/*      */
/*      */   private boolean deployPreparedClass(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  365 */     Annotation info = visible.getAnnotation(Prepare.class.getName());
/*  366 */     if (info != null)
/*      */     {
/*  368 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("Found top-level @Prepare in: " + cf.getName());
/*  369 */       Prepare prepare = (Prepare)AnnotationProxy.createProxy(info, Prepare.class);
/*      */
View Full Code Here

/*      */   }
/*      */
/*      */   private void undeployPreparedClass(AnnotationsAttribute visible, ClassFile cf)
/*      */     throws Exception
/*      */   {
/*  384 */     Annotation info = visible.getAnnotation(Prepare.class.getName());
/*  385 */     if (info != null)
/*      */     {
/*  387 */       String name = cf.getName() + "." + visible.getName();
/*  388 */       this.manager.removePointcut(name);
/*      */     }
View Full Code Here

/*      */     }
/*      */   }
/*      */
/*      */   private void deployPrecedence(AnnotationsAttribute visible, ClassFile cf) throws Exception
/*      */   {
/*  394 */     Annotation info = visible.getAnnotation(Precedence.class.getName());
/*  395 */     if (info != null)
/*      */     {
/*  397 */       if ((AspectManager.verbose) && (logger.isDebugEnabled())) logger.debug("Found top-level @Precedence in: " + cf.getName());
/*      */
/*  399 */       ArrayList entries = new ArrayList();
/*  400 */       Iterator fields = cf.getFields().iterator();
/*  401 */       while (fields.hasNext())
/*      */       {
/*  403 */         FieldInfo finfo = (FieldInfo)fields.next();
/*  404 */         AnnotationsAttribute mgroup = (AnnotationsAttribute)finfo.getAttribute("RuntimeVisibleAnnotations");
/*  405 */         if (mgroup != null) {
/*  406 */           Annotation binfo = mgroup.getAnnotation(PrecedenceInterceptor.class.getName());
/*  407 */           if (binfo != null)
/*      */           {
/*  410 */             entries.add(new PrecedenceDefEntry(getFieldType(finfo), null));
/*      */           }
/*      */           else
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.