final ScuflModel model = methodSigModel; if (theObject == null) { throw new NoContextMenuFoundException("Supplied user object was null, giving up."); } else if (theObject instanceof ScuflModel) { return getWorkflowMenu((ScuflModel) theObject); throw new NoContextMenuFoundException("Didn't know how to create a context menu for a " + theObject.getClass().toString());