Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.MethodCallByMethod


   {
      pojo.callMethod(false);
      assertFullInterception(MethodCallByMethod.class, "before8", "after6",
            "finally7", false);
     
      MethodCallByMethod joinPoint = (MethodCallByMethod)
         JoinPointAspect.beforeJoinPoint;
      assertSame("calledMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("callMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here


      assertTrue(exceptionThrown);
     
      assertFullInterception(MethodCallByMethod.class, "before8", "throwing8",
            "finally7", exceptionThrown);
     
      MethodCallByMethod joinPoint = (MethodCallByMethod)
         JoinPointAspect.beforeJoinPoint;
      assertSame("calledMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("callMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

   {
      JoinPointPOJO.staticCallMethod(pojo, false);
      assertFullInterception(MethodCallByMethod.class, "before8", "after6",
            "finally7", false);
     
      MethodCallByMethod joinPoint = (MethodCallByMethod)
      JoinPointAspect.beforeJoinPoint;
      assertSame("calledMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("staticCallMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(2, callerParameters.length);
      assertSame(JoinPointPOJO.class, callerParameters[0]);
      assertSame(boolean.class, callerParameters[1]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      assertTrue(exceptionThrown);
     
      assertFullInterception(MethodCallByMethod.class, "before8", "throwing8",
            "finally7", exceptionThrown);
     
      MethodCallByMethod joinPoint = (MethodCallByMethod)
         JoinPointAspect.beforeJoinPoint;
      assertSame("calledMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("staticCallMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(2, callerParameters.length);
      assertSame(JoinPointPOJO.class, callerParameters[0]);
      assertSame(boolean.class, callerParameters[1]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      pojo.callStaticMethod(false);
     
      assertFullInterception(MethodCallByMethod.class, "before8", "after6",
            "finally7", false);
     
      MethodCallByMethod joinPoint = (MethodCallByMethod)
         JoinPointAspect.beforeJoinPoint;
      assertSame("calledStaticMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("callStaticMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      assertTrue(exceptionThrown);
     
      assertFullInterception(MethodCallByMethod.class, "before8", "throwing8",
            "finally7", exceptionThrown);

      MethodCallByMethod joinPoint = (MethodCallByMethod)
         JoinPointAspect.beforeJoinPoint;
      assertSame("calledStaticMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("callStaticMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      JoinPointPOJO.staticCallStaticMethod(false);
     
      assertFullInterception(MethodCallByMethod.class, "before8", "after6",
            "finally7", false);
     
      MethodCallByMethod joinPoint = (MethodCallByMethod)
         JoinPointAspect.beforeJoinPoint;
      assertSame("calledStaticMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("staticCallStaticMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      assertTrue(exceptionThrown);
     
      assertFullInterception(MethodCallByMethod.class, "before8", "throwing8",
            "finally7", exceptionThrown);
     
      MethodCallByMethod joinPoint = (MethodCallByMethod)
         JoinPointAspect.beforeJoinPoint;
      assertSame("calledStaticMethod", joinPoint.getMethod().getName());
      Class[] parameters = joinPoint.getMethod().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getMethod().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("staticCallStaticMethod", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

TOP

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

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.