Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.FieldJoinpoint


      this.read = other.read;
   }
  
   protected Joinpoint internalGetJoinpoint()
   {
      return new FieldJoinpoint(advisedField);
   }  
View Full Code Here


         || (write && binding.getPointcut().matchesSet(this, field)))
         {
            if (AspectManager.verbose) System.err.println("[debug] field matched " + ((write) ? "write" : "read") + " binding: " + field);
            adviceBindings.add(binding);
            binding.addAdvisor(this);
            pointcutResolved(newFieldInfos[i], binding, new FieldJoinpoint(field));
         }
      }
   }
View Full Code Here

         || (write && binding.getPointcut().matchesSet(this, field)))
         {
            if (AspectManager.verbose) logger.debug("field matched " + ((write) ? "write" : "read") + " binding: " + field);
            adviceBindings.add(binding);
            binding.addAdvisor(this);
            pointcutResolved(newFieldInfos[i], binding, new FieldJoinpoint(field));
            if (AspectManager.maintainAdvisorMethodInterceptors && this.initialized)
            {
               interceptors[i] = newFieldInfos[i].getInterceptors();
            }
         }
View Full Code Here

            {
               if ((!write && ab.getPointcut().matchesGet(this, field))
                     || (write && ab.getPointcut().matchesSet(this, field)))
               {   
                  ab.addAdvisor(this);
                  pointcutResolved(fieldInfos[i], ab, new FieldJoinpoint(field));
               }
            }
            this.updateFieldPointcutAfterRemove(fieldInfos[i], i, write);
         }        
      }
View Full Code Here

         {
            if (AspectManager.verbose) System.err.println("[debug] field matched " + ((write) ? "write" : "read") + " binding: " + field);
            adviceBindings.add(binding);
            binding.addAdvisor(this);
            FieldInfo info = (FieldInfo)newFieldInfos.get(i);
            pointcutResolved(info, binding, new FieldJoinpoint(field));
         }
      }
   }
View Full Code Here

     
      AspectDefinition def = AspectManager.instance().getAspectDefinition("field");
      assertNotNull(def);
      InstanceAdvisor ia1 = ((Advised)pojo1)._getInstanceAdvisor();
      InstanceAdvisor ia2 = ((Advised)pojo2)._getInstanceAdvisor();
      FieldPerJoinpointInterceptor ia1Field1 = (FieldPerJoinpointInterceptor)ia1.getPerInstanceJoinpointAspect(new FieldJoinpoint(field1), def);
      assertNotNull(ia1Field1);
      FieldPerJoinpointInterceptor ia2Field1 = (FieldPerJoinpointInterceptor)ia2.getPerInstanceJoinpointAspect(new FieldJoinpoint(field1), def);
      assertNotNull(ia2Field1);
      FieldPerJoinpointInterceptor ia1Field2 = (FieldPerJoinpointInterceptor)ia1.getPerInstanceJoinpointAspect(new FieldJoinpoint(field2), def);
      assertNotNull(ia1Field2);
     
      assertSame(fieldRead1, ia1Field1);
      assertSame(fieldWrite2, ia2Field1);
      assertSame(field2Write1, ia1Field2);
     
      AspectDefinition statDef = AspectManager.instance().getAspectDefinition("staticField");
      assertNotNull(statDef);
      FieldPerJoinpointInterceptor advStatic = (FieldPerJoinpointInterceptor)((ClassAdvisor)((Advised)pojo1)._getAdvisor()).getFieldAspect(new FieldJoinpoint(staticField), statDef);
      assertSame(advStatic, staticWrite);
     
   }
View Full Code Here

            }
            return (Interceptor)icptr;
         }
         else if (joinpoint instanceof FieldJoinpoint)
         {
            FieldJoinpoint field = (FieldJoinpoint) joinpoint;
            ClassAdvisor classAdvisor = (ClassAdvisor) advisor;
            return (Interceptor) classAdvisor.getFieldAspect(field, aspect);
         }
        
         return (Interceptor) aspect.getFactory().createPerJoinpoint(advisor, joinpoint);
View Full Code Here

            return (Interceptor) def.getFactory().createPerJoinpoint(advisor, joinpoint);
         }
      }
      else if (joinpoint instanceof FieldJoinpoint)
      {
         FieldJoinpoint field = (FieldJoinpoint) joinpoint;
         if (Modifier.isStatic(field.getField().getModifiers()))
         {
            ClassAdvisor classAdvisor = (ClassAdvisor) advisor;
            return (Interceptor)classAdvisor.getFieldAspect(field, def);
         }
View Full Code Here

         {
            if (AspectManager.verbose) System.err.println("[debug] field matched " + ((write) ? "write" : "read") + " binding: " + field);
            adviceBindings.add(binding);
            binding.addAdvisor(this);
            FieldInfo info = (FieldInfo)newFieldInfos.get(i);
            pointcutResolved(info, binding, new FieldJoinpoint(field));
         }
      }
   }
View Full Code Here

            }
            return (Interceptor)icptr;
         }
         else if (joinpoint instanceof FieldJoinpoint)
         {
            FieldJoinpoint field = (FieldJoinpoint) joinpoint;
            ClassAdvisor classAdvisor = (ClassAdvisor) advisor;
            return (Interceptor) classAdvisor.getFieldAspect(field, aspect);
         }
        
         return (Interceptor) aspect.getFactory().createPerJoinpoint(advisor, joinpoint);
View Full Code Here

TOP

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

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.