Examples of MethodCallByConstructor


Examples of org.jboss.aop.joinpoint.MethodCallByConstructor

   {
      new JoinPointPOJO(false, false);
      assertFullInterception(MethodCallByConstructor.class, "before7", "after6",
            "finally3", false);
     
      MethodCallByConstructor joinPoint = (MethodCallByConstructor)
         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.getCallingConstructor().getDeclaringClass());
      Class[] callerParameters = joinPoint.getCallingConstructor().getParameterTypes();
      assertEquals(2, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertSame(boolean.class, callerParameters[1]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
   }
View Full Code Here

Examples of org.jboss.aop.joinpoint.MethodCallByConstructor

      assertTrue(exceptionThrown);
     
      assertFullInterception(MethodCallByConstructor.class, "before7", "throwing8",
            "finally3", exceptionThrown);

      MethodCallByConstructor joinPoint = (MethodCallByConstructor)
         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.getCallingConstructor().getDeclaringClass());
      Class[] callerParameters = joinPoint.getCallingConstructor().getParameterTypes();
      assertEquals(2, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertSame(boolean.class, callerParameters[1]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
   }
View Full Code Here

Examples of org.jboss.aop.joinpoint.MethodCallByConstructor

      new JoinPointPOJO('a', false);
     
      assertFullInterception(MethodCallByConstructor.class, "before7", "after6",
            "finally3", false);
     
      MethodCallByConstructor joinPoint = (MethodCallByConstructor)
         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.getCallingConstructor().getDeclaringClass());
      Class[] callerParameters = joinPoint.getCallingConstructor().getParameterTypes();
      assertEquals(2, callerParameters.length);
      assertSame(char.class, callerParameters[0]);
      assertSame(boolean.class, callerParameters[1]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
   }
View Full Code Here

Examples of org.jboss.aop.joinpoint.MethodCallByConstructor

      assertTrue(exceptionThrown);
     
      assertFullInterception(MethodCallByConstructor.class, "before7", "throwing8",
            "finally3", exceptionThrown);
     
      MethodCallByConstructor joinPoint = (MethodCallByConstructor)
         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.getCallingConstructor().getDeclaringClass());
      Class[] callerParameters = joinPoint.getCallingConstructor().getParameterTypes();
      assertEquals(2, callerParameters.length);
      assertSame(char.class, callerParameters[0]);
      assertSame(boolean.class, callerParameters[1]);
      assertEquals(MethodHashing.methodHash(joinPoint.getMethod()),
            joinPoint.getCalledMethodHash());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.