NSMutableDictionary branch = new NSMutableDictionary(); branch.setObjectForKey(method.getName(), "branchName"); branch.setObjectForKey(ERXStringUtilities.displayNameForKey(method.getName()), "branchButtonLabel");
NSDictionary branch = branchChoiceDictionary(method.getName(), null);
    public NSArray branchChoicesForContext(D2WContext context) {        NSArray choices = (NSArray)context.valueForKey("branchChoices");        if (choices == null || choices.count() == 0) {            try {                NSMutableArray methodChoices = new NSMutableArray();                Method methods[] = getClass().getMethods();                for (Enumeration e = new NSArray(methods).objectEnumerator(); e.hasMoreElements();) {                    Method method = (Method)e.nextElement();                    if (method.getParameterTypes().length == 1 &&                     method.getParameterTypes()[0] == WOComponent.class && !method.getName().equals("nextPage")) {                        NSMutableDictionary branch = new NSMutableDictionary();                        branch.setObjectForKey(method.getName(), "branchName");                        branch.setObjectForKey(ERXStringUtilities.displayNameForKey(method.getName()),                                                                "branchButtonLabel");                        methodChoices.addObject(branch);                            }                }                choices = methodChoices;            } catch (SecurityException e) {                log.error("Caught security exception while calculating the branch choices for delegate: "                         + this + " exception: " + e.getMessage());            }        }        return choices;    }