Examples of toMethod()


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

            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

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

      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

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

      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

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

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

      // 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

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

     
      // 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

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

     
      // 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

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

Examples of org.zkoss.xel.Function.toMethod()

    }
    public Method resolveFunction(String prefix, String name) {
      if (_mapper != null) {
        final Function f = _mapper.resolveFunction(prefix, name);
        if (f != null)
          return f.toMethod();
      }
      return null;
    }
  }
}
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.