Package org.codehaus.aspectwerkz.joinpoint

Examples of org.codehaus.aspectwerkz.joinpoint.Signature


                declaringClass, joinPointHash
        );
        Constructor targetConstructor = constructorTuple.getWrapperConstructor();
        String declaringClassName = targetConstructor.getDeclaringClass().getName().replace('.', '/');
        String constructorDescriptor = AsmHelper.getConstructorDescriptor(targetConstructor);
        Signature signature = new ConstructorSignatureImpl(constructorTuple.getDeclaringClass(), constructorTuple);
        Type[] argTypes = AsmHelper.getArgumentTypes(targetConstructor);
        if (Modifier.isPublic(targetConstructor.getModifiers()) && Modifier.isPublic(declaringClass.getModifiers())) {
            invokeConstructorCall(joinPointType, argTypes, cv, className, declaringClassName, constructorDescriptor);
        }
        else {
View Full Code Here


        final String className) {
        ConstructorTuple constructorTuple = AspectRegistry.getConstructorTuple(declaringClass, joinPointHash);
        Constructor targetConstructor = constructorTuple.getWrapperConstructor();
        String declaringClassName = targetConstructor.getDeclaringClass().getName().replace('.', '/');
        String constructorDescriptor = AsmHelper.getConstructorDescriptor(targetConstructor);
        Signature signature = new ConstructorSignatureImpl(constructorTuple.getDeclaringClass(), constructorTuple);
        Type[] argTypes = AsmHelper.getArgumentTypes(targetConstructor);
        if (Modifier.isPublic(targetConstructor.getModifiers()) && Modifier.isPublic(declaringClass.getModifiers())) {
            invokeConstructorCall(joinPointType, argTypes, cv, className, declaringClassName, constructorDescriptor);
        } else {
            invokeConstructorCallReflectively(cv);
View Full Code Here

                declaringClass, joinPointHash
        );
        Constructor targetConstructor = constructorTuple.getWrapperConstructor();
        String declaringClassName = targetConstructor.getDeclaringClass().getName().replace('.', '/');
        String constructorDescriptor = AsmHelper.getConstructorDescriptor(targetConstructor);
        Signature signature = new ConstructorSignatureImpl(constructorTuple.getDeclaringClass(), constructorTuple);
        Type[] argTypes = AsmHelper.getArgumentTypes(targetConstructor);
        if (Modifier.isPublic(targetConstructor.getModifiers()) && Modifier.isPublic(declaringClass.getModifiers())) {
            invokeConstructorCall(joinPointType, argTypes, cv, className, declaringClassName, constructorDescriptor);
        }
        else {
View Full Code Here

        final String className) {
        ConstructorTuple constructorTuple = AspectRegistry.getConstructorTuple(declaringClass, joinPointHash);
        Constructor targetConstructor = constructorTuple.getWrapperConstructor();
        String declaringClassName = targetConstructor.getDeclaringClass().getName().replace('.', '/');
        String constructorDescriptor = AsmHelper.getConstructorDescriptor(targetConstructor);
        Signature signature = new ConstructorSignatureImpl(constructorTuple.getDeclaringClass(), constructorTuple);
        Type[] argTypes = AsmHelper.getArgumentTypes(targetConstructor);
        if (Modifier.isPublic(targetConstructor.getModifiers()) && Modifier.isPublic(declaringClass.getModifiers())) {
            invokeConstructorCall(joinPointType, argTypes, cv, className, declaringClassName, constructorDescriptor);
        } else {
            invokeConstructorCallReflectively(cv);
View Full Code Here

                   sjp.getType());

     

      Signature signature = sjp.getSignature();

      assertNotNull(signature);

     

      assertEquals(signatureClass,

                   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());

     

      assertEquals(clazz,

                   enclSig.getDeclaringType());



    }
View Full Code Here

      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());

      }

     
View Full Code Here

                   sjp.getCalleeClass());
     
      assertEquals(JoinPointType.STATIC_INITIALIZATION,
                   sjp.getType());
     
      Signature signature = sjp.getSignature();
      assertNotNull(signature);
     
      assertEquals(signatureClass,
                   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());
     
      assertEquals(clazz,
                   enclSig.getDeclaringType());

    }
  }
View Full Code Here

     
      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());
View Full Code Here

                declaringClass, joinPointHash
        );
        Constructor targetConstructor = constructorTuple.getWrapperConstructor();
        String declaringClassName = targetConstructor.getDeclaringClass().getName().replace('.', '/');
        String constructorDescriptor = AsmHelper.getConstructorDescriptor(targetConstructor);
        Signature signature = new ConstructorSignatureImpl(constructorTuple.getDeclaringClass(), constructorTuple);
        Type[] argTypes = AsmHelper.getArgumentTypes(targetConstructor);
        if (Modifier.isPublic(targetConstructor.getModifiers()) && Modifier.isPublic(declaringClass.getModifiers())) {
            invokeConstructorCall(joinPointType, argTypes, cv, className, declaringClassName, constructorDescriptor);
        }
        else {
View Full Code Here

            final int joinPointType,
            final Class declaringClass,
            final AdviceContainer[] adviceIndexes) {
        MethodTuple methodTuple = m_system.getAspectManager().getMethodTuple(declaringClass, methodHash);
        Class declaringType = methodTuple.getDeclaringClass();
        Signature signature = new MethodSignatureImpl(declaringType, methodTuple);

        List cflowExpressions = m_system.getAspectManager().getCFlowExpressions(
                ReflectionMetaDataMaker.createClassMetaData(declaringClass),
                ReflectionMetaDataMaker.createMethodMetaData(methodTuple.getWrapperMethod()),
                null, PointcutType.EXECUTION//TODO CAN BE @CALL - see proceedWithCallJoinPoint
View Full Code Here

TOP

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

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.