Package org.jboss.aop

Examples of org.jboss.aop.ClassAdvisor$ConByMethodData


   }
  
   @SuppressWarnings("unchecked")
   public BeanContext<T> construct(Object initargs[], Class<?> parameterTypes[]) throws SecurityException, NoSuchMethodException
   {
      ClassAdvisor advisor = getAdvisor();
      Constructor<T> constructor = advisor.getClazz().getConstructor(parameterTypes);
      BeanContext<T> targetObject = construct(constructor, initargs);
     
      if(targetObject instanceof IndirectContainer)
         ((IndirectContainer<T, C>) targetObject).setDirectContainer((C) this);
     
View Full Code Here


      {
         Map.Entry<String, Advisor> entry = it2.next();
         String classname = entry.getKey();
         indenter(pw, indent);
         pw.println("<class name=\"" + classname + "\">");
         ClassAdvisor advisor = (ClassAdvisor) entry.getValue();
         outputAdvisor(indent + 1, pw, advisor, root, classname);
         indenter(pw, indent);
         pw.println("</class>");
      }
   }
View Full Code Here

            {
               continue;
            }
            // Only need a temporary advisor for resolving metadata
            CtClass ctRef = null;
            ClassAdvisor advisor = null;
            if (ref.equals(clazz.getName()))
            {
               ctRef = clazz;
               advisor = clazzAdvisor;
            }
View Full Code Here

      if (superClass == null || superClass.getName().indexOf("java.") == 0)
      {
         return false;
      }

      ClassAdvisor advisor;
      try
      {
         //TODO Would ideally like to be able to use the existing advisor if class already exists
         advisor = instrumentor.getManager().getTempClassAdvisor(superClass);
      }
View Full Code Here

   private boolean isTargetConstructorAdvised(CtConstructor calledConstructor)
   {
      try
      {
         ClassAdvisor adv = manager.getTempClassAdvisor(calledConstructor.getDeclaringClass());
         return ConstructorExecutionTransformer.isAdvisableConstructor(calledConstructor, adv);
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

/*     */
/*     */   private boolean isTargetConstructorAdvised(CtConstructor calledConstructor)
/*     */   {
/*     */     try
/*     */     {
/* 115 */       ClassAdvisor adv = this.manager.getTempClassAdvisor(calledConstructor.getDeclaringClass());
/* 116 */       return ConstructorExecutionTransformer.isAdvisableConstructor(calledConstructor, adv);
/*     */     }
/*     */     catch (Exception e) {
/*     */     }
/* 120 */     throw new RuntimeException(e);
View Full Code Here

/* 130 */     if ((superClass == null) || (superClass.getName().indexOf("java.") == 0))
/*     */     {
/* 132 */       return false;
/*     */     }
/*     */
/*     */     ClassAdvisor advisor;
/*     */     try
/*     */     {
/* 139 */       advisor = this.instrumentor.getManager().getTempClassAdvisor(superClass);
/*     */     }
/*     */     catch (Exception e)
View Full Code Here

/*     */
/* 114 */     Iterator it = this.fieldMap.values().iterator();
/* 115 */     while (it.hasNext())
/*     */     {
/* 117 */       DistributedFieldUpdate update = (DistributedFieldUpdate)it.next();
/* 118 */       ClassAdvisor advisor = (ClassAdvisor)advised._getAdvisor();
/* 119 */       log.trace("build field " + advisor.getAdvisedFields()[update.getFieldIndex()].getName());
/* 120 */       Object val = update.getNonDereferencedValue();
/* 121 */       if ((val != null) && ((val instanceof VersionReference)))
/*     */       {
/* 123 */         VersionReference ref = (VersionReference)val;
/* 124 */         log.trace("VersionReference.guid: " + ref.getGUID() + " for field " + advisor.getAdvisedFields()[update.getFieldIndex()].getName());
/* 125 */         val = manager.getObject(ref.getGUID());
/* 126 */         if (val == null)
/*     */         {
/* 128 */           DistributedState fieldVal = manager.getState(ref.getGUID());
/* 129 */           val = fieldVal.buildObject(manager, versionManager);
View Full Code Here

/*     */         {
/* 261 */           advised = (Advised)this.advisedRef.get();
/*     */         }
/* 263 */         if (advised != null)
/*     */         {
/* 265 */           ClassAdvisor advisor = (ClassAdvisor)advised._getAdvisor();
/* 266 */           Field field = advisor.getAdvisedFields()[index.intValue()];
/* 267 */           throw new OptimisticLockFailure("optimistic lock failure for field " + field.getName() + " of class " + field.getDeclaringClass().getName());
/*     */         }
/*     */       }
/*     */     }
/*     */   }
View Full Code Here

/*    */
/*    */   public Object invoke(Invocation invocation) throws Throwable {
/* 49 */     Object target = invocation.getTargetObject();
/* 50 */     if ((target instanceof Advised))
/*    */     {
/* 52 */       ClassAdvisor advisor = (ClassAdvisor)((Advised)target)._getAdvisor();
/*    */
/* 55 */       return advisor.invoke(invocation);
/*    */     }
/*    */
/* 59 */     if ((invocation instanceof MethodInvocation))
/*    */     {
/* 62 */       MethodInvocation methodInvocation = (MethodInvocation)invocation;
View Full Code Here

TOP

Related Classes of org.jboss.aop.ClassAdvisor$ConByMethodData

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.