Package org.jboss.ejb3.common.lang

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


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

      // now make a copy through serialization/de-serialization
      SerializableMethod copyOfSerializableMethod = (SerializableMethod) SerializationUtil.getCopy(serializableMethod);
      Method copyOfMethod = copyOfSerializableMethod.toMethod();

      // test equals
      assertTrue("Failure - equals fails for toMethod when serialized", method.equals(copyOfMethod));

      // test hashCode
View Full Code Here


      // Create SerializableMethod
      SerializableMethod serializableMethodForPrimitiveVarArgMethod = new SerializableMethod(primitiveVarArgMethod);

      // Call toMethod
      Method returnedMethod = serializableMethodForPrimitiveVarArgMethod.toMethod();
     
      //test equals
      assertTrue("Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method", returnedMethod.equals(primitiveVarArgMethod));

      // test hashCode
View Full Code Here

     
      // Create a serializablemethod out of it
      SerializableMethod serializableMethodForNonPrimitiveVarArg = new SerializableMethod(nonPrimitiveVarArgMethod);
     
      // Call toMethod
      Method returnedMethodForNonPrimitiveVarArg = serializableMethodForNonPrimitiveVarArg.toMethod();
     
      // test equals
      assertTrue("Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method", returnedMethodForNonPrimitiveVarArg.equals(nonPrimitiveVarArgMethod));

      // test hashCode
View Full Code Here

     
      // Create a serializablemethod out of it
      SerializableMethod serializableMethodForMixedVarArgMethod = new SerializableMethod(mixedVarArgMethod);
     
      // Call toMethod
      Method returnedMethodForMixedVarArgMethod = serializableMethodForMixedVarArgMethod.toMethod();
     
      // test equals
      assertTrue("Failure - The method returned by toMethod() of SerializableMethod is not equal to the original method", returnedMethodForMixedVarArgMethod.equals(mixedVarArgMethod));

      // test hashCode
View Full Code Here

      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

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.