Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.FieldReadInvocation


   public Object invokeRead(Object target, int index)
   throws Throwable
   {
      Interceptor[] aspects = fieldReadInfos[index].getInterceptors();
      if (aspects == null) aspects = new Interceptor[0];
      FieldReadInvocation invocation;
      if (target != null)
      {
         InstanceAdvised advised = (InstanceAdvised) target;
         InstanceAdvisor advisor = advised._getInstanceAdvisor();
         if (advisor != null && advisor.hasInterceptors())
         {
            aspects = advisor.getInterceptors(aspects);
         }
      }
      invocation = new FieldReadInvocation(advisedFields[index], index, aspects);
      invocation.setAdvisor(this);
      invocation.setTargetObject(target);
      return invocation.invokeNext();
   }
View Full Code Here


         field.set(target, val);
         return null;
      }
      else if (invocation instanceof FieldReadInvocation)
      {
         FieldReadInvocation fieldInvocation = (FieldReadInvocation) invocation;
         Object target = fieldInvocation.getTargetObject();
         Field field = fieldInvocation.getField();
         return field.get(target);
      }
      else if (invocation instanceof MethodInvocation)
      {
         MethodInvocation methodInvocation = (MethodInvocation) invocation;
View Full Code Here

   public Object invokeRead(Object target, int index)
   throws Throwable
   {
      Interceptor[] aspects = fieldReadInfos[index].getInterceptors();
      if (aspects == null) aspects = new Interceptor[0];
      FieldReadInvocation invocation;
      if (target != null)
      {
         InstanceAdvised advised = (InstanceAdvised) target;
         InstanceAdvisor advisor = advised._getInstanceAdvisor();
         if (advisor != null && advisor.hasInterceptors())
         {
            aspects = advisor.getInterceptors(aspects);
         }
      }
      invocation = new FieldReadInvocation(advisedFields[index], index, aspects);
      invocation.setAdvisor(this);
      invocation.setTargetObject(target);
      return invocation.invokeNext();
   }
View Full Code Here

         field.set(target, val);
         return null;
      }
      else if (invocation instanceof FieldReadInvocation)
      {
         FieldReadInvocation fieldInvocation = (FieldReadInvocation) invocation;
         Object target = fieldInvocation.getTargetObject();
         Field field = fieldInvocation.getField();
         return field.get(target);
      }
      else if (invocation instanceof MethodInvocation)
      {
         MethodInvocation methodInvocation = (MethodInvocation) invocation;
View Full Code Here

/*     */   public Object fieldRead(Invocation invocation) throws Throwable
/*     */   {
/* 149 */     acquireReadLock();
/*     */     try
/*     */     {
/* 152 */       FieldReadInvocation fieldInvocation = (FieldReadInvocation)invocation;
/* 153 */       Integer index = new Integer(fieldInvocation.getIndex());
/* 154 */       HashMap map = getTxState();
/* 155 */       if (map == null)
/*     */       {
/* 157 */         map = this.fieldMap;
/*     */       }
View Full Code Here

/*  68 */       ConstructorInvocation mi = (ConstructorInvocation)invocation;
/*  69 */       return this.p.matchesExecution(mi.getAdvisor(), mi.getConstructor());
/*     */     }
/*  71 */     if ((invocation instanceof FieldReadInvocation))
/*     */     {
/*  73 */       FieldReadInvocation mi = (FieldReadInvocation)invocation;
/*  74 */       return this.p.matchesGet(mi.getAdvisor(), mi.getField());
/*     */     }
/*  76 */     if ((invocation instanceof FieldWriteInvocation))
/*     */     {
/*  78 */       FieldWriteInvocation mi = (FieldWriteInvocation)invocation;
/*  79 */       return this.p.matchesSet(mi.getAdvisor(), mi.getField());
/*     */     }
/*  81 */     if ((invocation instanceof MethodCalledByMethodInvocation))
/*     */     {
/*  83 */       MethodCalledByMethodInvocation mi = (MethodCalledByMethodInvocation)invocation;
/*  84 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCallingMethod(), mi.getCalledMethod().getDeclaringClass(), mi.getCalledMethod());
/*     */     }
/*  86 */     if ((invocation instanceof MethodCalledByConstructorInvocation))
/*     */     {
/*  88 */       MethodCalledByConstructorInvocation mi = (MethodCalledByConstructorInvocation)invocation;
/*  89 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCalling(), mi.getCalledMethod().getDeclaringClass(), mi.getCalledMethod());
/*     */     }
/*  91 */     if ((invocation instanceof ConstructorCalledByConstructorInvocation))
/*     */     {
/*  93 */       ConstructorCalledByConstructorInvocation mi = (ConstructorCalledByConstructorInvocation)invocation;
/*  94 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCallingConstructor(), mi.getCalledConstructor().getDeclaringClass(), mi.getCalledConstructor());
/*     */     }
/*  96 */     if ((invocation instanceof ConstructorCalledByMethodInvocation))
/*     */     {
/*  98 */       ConstructorCalledByMethodInvocation mi = (ConstructorCalledByMethodInvocation)invocation;
/*  99 */       return this.p.matchesCall(mi.getAdvisor(), mi.getCallingMethod(), mi.getCalledConstructor().getDeclaringClass(), mi.getCalledConstructor());
/*     */     }
/* 101 */     throw new RuntimeException("UNKNOWN JOINPOINT TYPE: " + invocation.getClass().getName());
/*     */   }
View Full Code Here

/* 1619 */       if ((advisor != null) && (advisor.hasInterceptors()))
/*      */       {
/* 1621 */         aspects = advisor.getInterceptors(aspects);
/*      */       }
/*      */     }
/* 1624 */     FieldReadInvocation invocation = new FieldReadInvocation(this.advisedFields[index], index, aspects);
/* 1625 */     invocation.setAdvisor(this);
/* 1626 */     invocation.setTargetObject(target);
/* 1627 */     return invocation.invokeNext();
/*      */   }
View Full Code Here

/* 1667 */       field.set(target, val);
/* 1668 */       return null;
/*      */     }
/* 1670 */     if ((invocation instanceof FieldReadInvocation))
/*      */     {
/* 1672 */       FieldReadInvocation fieldInvocation = (FieldReadInvocation)invocation;
/* 1673 */       Object target = fieldInvocation.getTargetObject();
/* 1674 */       Field field = fieldInvocation.getField();
/* 1675 */       return field.get(target);
/*      */     }
/* 1677 */     if ((invocation instanceof MethodInvocation))
/*      */     {
/* 1679 */       MethodInvocation methodInvocation = (MethodInvocation)invocation;
View Full Code Here

   public Object invokeRead(Object target, int index)
   throws Throwable
   {
      Interceptor[] aspects = fieldReadInfos[index].getInterceptors();
      if (aspects == null) aspects = new Interceptor[0];
      FieldReadInvocation invocation;
      if (target != null)
      {
         InstanceAdvised advised = (InstanceAdvised) target;
         InstanceAdvisor advisor = advised._getInstanceAdvisor();
         if (advisor != null && advisor.hasInterceptors())
         {
            aspects = advisor.getInterceptors(aspects);
         }
      }
      invocation = new FieldReadInvocation(advisedFields[index], index, aspects);
      invocation.setAdvisor(this);
      invocation.setTargetObject(target);
      return invocation.invokeNext();
   }
View Full Code Here

         field.set(target, val);
         return null;
      }
      else if (invocation instanceof FieldReadInvocation)
      {
         FieldReadInvocation fieldInvocation = (FieldReadInvocation) invocation;
         Object target = fieldInvocation.getTargetObject();
         Field field = fieldInvocation.getField();
         return field.get(target);
      }
      else if (invocation instanceof MethodInvocation)
      {
         MethodInvocation methodInvocation = (MethodInvocation) invocation;
View Full Code Here

TOP

Related Classes of org.jboss.aop.joinpoint.FieldReadInvocation

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.