Package org.codehaus.aspectwerkz.joinpoint

Examples of org.codehaus.aspectwerkz.joinpoint.EnclosingStaticJoinPoint


                   signature.getDeclaringType());

     

      EnclosingStaticJoinPoint esjp = sjp.getEnclosingStaticJoinPoint();

     

      assertNotNull(esjp);

     

      assertEquals(JoinPointType.STATIC_INITIALIZATION,

                   esjp.getType());

     

      Signature enclSig = esjp.getSignature();

     

      assertNotNull(enclSig);
View Full Code Here


  public void ctorCtorCall(StaticJoinPoint sjp) {

    //System.out.println(".ctorCtorCall");

    EnclosingStaticJoinPoint esjp = sjp.getEnclosingStaticJoinPoint();

    EnclosingSJPTest.registerEnclosingSJP(esjp);

  }
View Full Code Here

   

    for(int i = 0; i < 3; i++) {

      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) s_enclosingStaticJPList.get(i);

      Constructor enclosingCtor = ((ConstructorSignature) esjp.getSignature()).getConstructor();

     

      assertTrue(

          ctor.toString(),

          ctor.equals(enclosingCtor));

    }

   

    for(int i = 3; i < 6; i++) {

      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) s_enclosingStaticJPList.get(i);

      Method method = ((MethodSignature) esjp.getSignature()).getMethod();

     

      assertTrue(

          setMethod.toString(),

          setMethod.equals(method));

    }

   

    for(int i = 6; i < s_enclosingStaticJPList.size(); i++) {

      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) s_enclosingStaticJPList.get(i);

      Method method = ((MethodSignature) esjp.getSignature()).getMethod();

     

      assertTrue(
View Full Code Here

   

    for(int i = 0; i < enclosingTypes.length; i++) {

      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) esjpList.get(i);

     

      assertNotNull("EnclosingStaticJoinPoint should never be null", esjp);

     

      assertNotNull("Signature should not be null", esjp.getSignature());

         

      Signature sig = esjp.getSignature();

     

      if(sig instanceof ConstructorSignature) {

        assertNotNull(((ConstructorSignature) sig).getConstructor());

      } else if(sig instanceof MethodSignature) {

        assertNotNull(((MethodSignature) sig).getMethod());

      } else {

        fail("unexpected signature type: " + sig.getClass().getName());

      }

     

      assertEquals("expectation on enclosing JP type failed",

          enclosingTypes[i],

          esjp.getType());

     

      assertTrue("expectation on enclosing Signature class failed",

          (signatureClass[i].isAssignableFrom(esjp.getSignature().getClass())));



    }
View Full Code Here

      assertEquals(EXPECTED_JP_TYPES[i], sjp.getType());

         

          EnclosingStaticJoinPoint esjp = sjp.getEnclosingStaticJoinPoint();



            assertTrue(

                    ENCLOSING_SJP_CLASS.isAssignableFrom(esjp.getSignature().getClass())

            );



            assertEquals(ENCLOSING_SJP_TYPE,

                         esjp.getType()

            );

    }
View Full Code Here

  /**
   * @Before call(test.enclosingsjp.PointcutTarget.new()) && within(test.enclosingsjp..*)
   */
  public void ctorCtorCall(StaticJoinPoint sjp) {
    //System.out.println(".ctorCtorCall");
    EnclosingStaticJoinPoint esjp = sjp.getEnclosingStaticJoinPoint();
    EnclosingSJPTest.registerEnclosingSJP(esjp);
  }
View Full Code Here

    Constructor ctor = et.getClass().getConstructor(new Class[] {Object.class});
    Method setMethod = PointcutTarget.class.getMethod("setFieldValue", new Class[] {Object.class});
    Method getMethod = PointcutTarget.class.getMethod("getFieldValue", null);
   
    for(int i = 0; i < 3; i++) {
      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) s_enclosingStaticJPList.get(i);
      Constructor enclosingCtor = ((ConstructorSignature) esjp.getSignature()).getConstructor();
     
      assertTrue(
          ctor.toString(),
          ctor.equals(enclosingCtor));
    }
   
    for(int i = 3; i < 6; i++) {
      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) s_enclosingStaticJPList.get(i);
      Method method = ((MethodSignature) esjp.getSignature()).getMethod();
     
      assertTrue(
          setMethod.toString(),
          setMethod.equals(method));
    }
   
    for(int i = 6; i < s_enclosingStaticJPList.size(); i++) {
      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) s_enclosingStaticJPList.get(i);
      Method method = ((MethodSignature) esjp.getSignature()).getMethod();
     
      assertTrue(
          getMethod.toString(),
          getMethod.equals(method));
    }
View Full Code Here

      List esjpList) {
   
    assertEquals(enclosingTypes.length, esjpList.size());
   
    for(int i = 0; i < enclosingTypes.length; i++) {
      EnclosingStaticJoinPoint esjp = (EnclosingStaticJoinPoint) esjpList.get(i);
     
      assertNotNull("EnclosingStaticJoinPoint should never be null", esjp);
     
      assertNotNull("Signature should not be null", esjp.getSignature());
         
      Signature sig = esjp.getSignature();
     
      if(sig instanceof ConstructorSignature) {
        assertNotNull(((ConstructorSignature) sig).getConstructor());
      } else if(sig instanceof MethodSignature) {
        assertNotNull(((MethodSignature) sig).getMethod());
      } else {
        fail("unexpected signature type: " + sig.getClass().getName());
      }
     
      assertEquals("expectation on enclosing JP type failed",
          enclosingTypes[i],
          esjp.getType());
     
      assertTrue("expectation on enclosing Signature class failed",
          (signatureClass[i].isAssignableFrom(esjp.getSignature().getClass())));

    }
  }
View Full Code Here

                   signature.getClass());
     
      assertEquals(clazz,
                   signature.getDeclaringType());
     
      EnclosingStaticJoinPoint esjp = sjp.getEnclosingStaticJoinPoint();
     
      assertNotNull(esjp);
     
      assertEquals(JoinPointType.STATIC_INITIALIZATION,
                   esjp.getType());
     
      Signature enclSig = esjp.getSignature();
     
      assertNotNull(enclSig);
     
      assertEquals(signatureClass,
                   enclSig.getClass());
View Full Code Here

              EXPECTED_SIGNATURES[i].isAssignableFrom(sjp.getSignature().getClass())
      );

      assertEquals(EXPECTED_JP_TYPES[i], sjp.getType());
         
          EnclosingStaticJoinPoint esjp = sjp.getEnclosingStaticJoinPoint();

            assertTrue(
                    ENCLOSING_SJP_CLASS.isAssignableFrom(esjp.getSignature().getClass())
            );

            assertEquals(ENCLOSING_SJP_TYPE,
                         esjp.getType()
            );
    }
  }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.joinpoint.EnclosingStaticJoinPoint

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.