Examples of multicastTargets()


Examples of com.thoughtworks.proxy.toys.multicast.Multicast.multicastTargets()

            List list2 = new LinkedList();
            list2.add(new Integer(3));
            List listCombined = (List)Multicasting.object(new List[]{list1, list2});
            Multicast values = (Multicast)listCombined.get(0);
            System.out.println("Sum of the first integers: "
                    + values.multicastTargets(Integer.class, "intValue", null).toString());
        } catch (NoSuchMethodException e) {
            // Integer.class has a intValue method
        }
    }
View Full Code Here

Examples of com.thoughtworks.proxy.toys.multicast.Multicast.multicastTargets()

    public static void packageOverviewExample4() {
        try {
            Method method = String.class.getMethod("length", null);
            Multicast multicast = (Multicast)Multicasting.object(new Object[]{"ProxyToys", "is", "great"});
            System.out.println("Total number of characters: " + multicast.multicastTargets(method, null));
            String[] strings = (String[])multicast.getTargetsInArray(String.class);
            for (int i = 0; i < strings.length; i++) {
                System.out.println("String[" + i + "]: " + strings[i]);
            }
        } catch (NoSuchMethodException e) {
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.