Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.ConstructorCallByMethod


      return returnType.get();
   }

   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, AdviceSetup setup)
   {
      ConstructorCallByMethod call = (ConstructorCallByMethod) joinPoint;
      Constructor ctor = call.getConstructor();
      AdviceMethodProperties properties = new AdviceMethodProperties(
               joinPoint,
               setup.getAspectClass(),
               setup.getAdviceName(),
               JOINPOINT_TYPE,
               INVOCATION_TYPE,
               ctor.getDeclaringClass(),
               ctor.getGenericParameterTypes(),
               ctor.getParameterTypes(),
               ctor.getGenericExceptionTypes(),
               call.getCalledClass(),
               false,
               call.getCallingClass(),
               hasCallingObject());
      return properties;
   }
View Full Code Here


   {
      pojo.callConstructor(false);
      assertFullInterception(ConstructorCallByMethod.class, "before3", "after5",
            "finally6", false);
     
      ConstructorCallByMethod joinPoint = (ConstructorCallByMethod)
      JoinPointAspect.beforeJoinPoint;
      Class[] parameters = joinPoint.getConstructor().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getConstructor().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("callConstructor", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      assertTrue(exceptionThrown);
     
      assertFullInterception(ConstructorCallByMethod.class, "before3", "throwing7",
            "finally6", true);
     
      ConstructorCallByMethod joinPoint = (ConstructorCallByMethod)
      JoinPointAspect.beforeJoinPoint;
      Class[] parameters = joinPoint.getConstructor().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getConstructor().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("callConstructor", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      JoinPointPOJO.staticCallConstructor(false);
     
      assertFullInterception(ConstructorCallByMethod.class, "before3", "after5",
            "finally6", false);
     
      ConstructorCallByMethod joinPoint = (ConstructorCallByMethod)
      JoinPointAspect.beforeJoinPoint;
      Class[] parameters = joinPoint.getConstructor().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getConstructor().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("staticCallConstructor", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      assertTrue(exceptionThrown);
     
      assertFullInterception(ConstructorCallByMethod.class, "before3", "throwing7",
            "finally6", exceptionThrown);
     
      ConstructorCallByMethod joinPoint = (ConstructorCallByMethod)
      JoinPointAspect.beforeJoinPoint;
      Class[] parameters = joinPoint.getConstructor().getParameterTypes();
      assertEquals(1, parameters.length);
      assertSame(boolean.class, parameters[0]);
      assertSame(JoinPointPOJO.class, joinPoint.getConstructor().getDeclaringClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCalledClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingClass());
      assertSame(JoinPointPOJO.class, joinPoint.getCallingMethod().getDeclaringClass());
      assertSame("staticCallConstructor", joinPoint.getCallingMethod().getName());
      Class[] callerParameters = joinPoint.getCallingMethod().getParameterTypes();
      assertEquals(1, callerParameters.length);
      assertSame(boolean.class, callerParameters[0]);
      assertEquals(MethodHashing.methodHash(joinPoint.getCallingMethod()),
            joinPoint.getCallingMethodHash());
   }
View Full Code Here

      return returnType.get();
   }

   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, AdviceSetup setup)
   {
      ConstructorCallByMethod call = (ConstructorCallByMethod) joinPoint;
      Constructor<?> ctor = call.getConstructor();
      AdviceMethodProperties properties = new AdviceMethodProperties(
               joinPoint,
               setup.getAspectClass(),
               setup.getAdviceName(),
               JOINPOINT_TYPE,
               INVOCATION_TYPE,
               ctor.getDeclaringClass(),
               ctor.getGenericParameterTypes(),
               ctor.getParameterTypes(),
               ctor.getGenericExceptionTypes(),
               call.getCalledClass(),
               false,
               call.getCallingClass(),
               hasCallingObject());
      return properties;
   }
View Full Code Here

/* 128 */     return (Class)this.returnType.get();
/*     */   }
/*     */
/*     */   protected AdviceMethodProperties getAdviceMethodProperties(JoinPointBean joinPoint, JoinPointGenerator.AdviceSetup setup)
/*     */   {
/* 133 */     ConstructorCallByMethod call = (ConstructorCallByMethod)joinPoint;
/* 134 */     Constructor ctor = call.getConstructor();
/* 135 */     AdviceMethodProperties properties = new AdviceMethodProperties(joinPoint, setup.getAspectClass(), setup.getAdviceName(), JOINPOINT_TYPE, INVOCATION_TYPE, ctor.getDeclaringClass(), ctor.getGenericParameterTypes(), ctor.getParameterTypes(), ctor.getGenericExceptionTypes(), call.getCalledClass(), false, call.getCallingClass(), hasCallingObject());
/*     */
/* 149 */     return properties;
/*     */   }
View Full Code Here

TOP

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

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.