Package org.jboss.ejb3.common.lang

Examples of org.jboss.ejb3.common.lang.SerializableMethod.toMethod()


      assert serializableMethodArg instanceof SerializableMethod : "2nd Argument was expected to be of type "
            + SerializableMethod.class.getName() + ", was instead " + serializableMethodArg;
      SerializableMethod serializableMethod = (SerializableMethod) serializableMethodArg;

      // Obtain the Method represented by the SerializableMethod
      Method dynamicInvokeMethod = serializableMethod.toMethod();
      long hash = MethodHashing.calculateHash(dynamicInvokeMethod);

      // Log
      log.debug("Received invocation request to method " + serializableMethod + "; using hash: " + hash);
View Full Code Here


      final SerializableMethod invokedMethod = new SerializableMethod(method, actualClass);
     
      /*
       * Obtain the Container
       */
      final InvokableContext container = this.getContainer(invokedMethod.toMethod(), usedArgs);

      /*
       * Invoke
       */

 
View Full Code Here

      final SerializableMethod invokedMethod = new SerializableMethod(method, actualClass);
     
      /*
       * Obtain the Container
       */
      final InvokableContext container = this.getContainer(invokedMethod.toMethod(), usedArgs);

      /*
       * Invoke
       */

 
View Full Code Here

      Method methodWithoutPrimitivesParams = myClass.getClass().getMethod("methodWithParamAndReturningVoid",
            new Class[]
            {Integer.class});
      SerializableMethod serializableMethod = new SerializableMethod(methodWithoutPrimitivesParams, myClass.getClass());
      // invoke the toMethod()
      Method copyOfMethodWithoutPrimitiveParams = serializableMethod.toMethod();

      // test equals
      assertTrue(
            "Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method",
            methodWithoutPrimitivesParams.equals(copyOfMethodWithoutPrimitiveParams));
View Full Code Here

      Method methodWithGenerics = myClass.getClass().getMethod("methodWithGenerics", new Class[]
      {List.class, int.class});
      SerializableMethod serializableMethod = new SerializableMethod(methodWithGenerics, myClass.getClass());

      Method copyOfMethodWithGenerics = serializableMethod.toMethod();

      // test equals
      assertTrue(
            "Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method",
            methodWithGenerics.equals(copyOfMethodWithGenerics));
View Full Code Here

      Method method = myClass.getClass().getMethod("methodWithPrimitiveParamsAndReturningVoid", new Class[]
      {byte.class, short.class, int.class, long.class, char.class, float.class, double.class, boolean.class});
      SerializableMethod serializableMethod = new SerializableMethod(method, myClass.getClass());
      // invoke the toMethod()
      Method copyOfMethod = serializableMethod.toMethod();

      // test equals
      assertTrue(
            "Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method",
            method.equals(copyOfMethod));
View Full Code Here

      Method methodReturningInteger = myClass.getClass().getMethod("methodReturingInteger", new Class[]
      {Integer.class});
      SerializableMethod serializableMethod = new SerializableMethod(methodReturningInteger, myClass.getClass());
      // invoke the toMethod()
      Method copyOfMethodReturingInteger = serializableMethod.toMethod();

      // test equals
      assertTrue(
            "Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method",
            methodReturningInteger.equals(copyOfMethodReturingInteger));
View Full Code Here

            new Class[]
            {int[].class});
      SerializableMethod serializableMethod = new SerializableMethod(methodAcceptingArrayOfPrimitives, myClass
            .getClass());
      // invoke the toMethod()
      Method copyOfMethodAcceptingArrayOfPrimitives = serializableMethod.toMethod();

      //test equals
      assertTrue(
            "Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method",
            methodAcceptingArrayOfPrimitives.equals(copyOfMethodAcceptingArrayOfPrimitives));
View Full Code Here

      Method methodAcceptingArrayOfObjects = myClass.getClass().getMethod("methodAcceptingArrayOfObjects", new Class[]
      {Object[].class});
      SerializableMethod serializableMethod_arrayOfObjParams = new SerializableMethod(methodAcceptingArrayOfObjects,
            myClass.getClass());
      //invoke the toMethod()
      Method copyOfMethodAcceptingArrayOfObjects = serializableMethod_arrayOfObjParams.toMethod();

      // test equals
      assertTrue("Failure - The method returned by toMethod() of SerializableMethod is not equal to original method",
            methodAcceptingArrayOfObjects.equals(copyOfMethodAcceptingArrayOfObjects));
View Full Code Here

      SerializableMethod serializableMethod = new SerializableMethod(method, myClass.getClass());
      SerializableMethod serializableMethodToString = new SerializableMethod(methodToString, myClass.getClass());

      // invoke toMethod
      Method copyOfMethod = serializableMethod.toMethod(this.getClass().getClassLoader());
      Method copyOfMethodToString = serializableMethodToString.toMethod(this.getClass().getClassLoader());

      // test equals
      assertTrue("Failure - equals fails with classsloader passed to toMethod", method.equals(copyOfMethod));

      // test hashCode
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.