public static AddItemDialog create(final Class type, final Object instance) {
		final AddItemDialog dialog = new AddItemDialog();

		for (final Method m : type.getMethods()) {
			if (m.getName().startsWith("set")
					&& (m.getParameterTypes().length == 1)) {
				final String name = m.getName().substring(3);

				Method g = null;

				try {
					g = type.getMethod("get" + name);
				} catch (final Exception e) {
				}
				if (g == null) {
					try {
						g = type.getMethod("is" + name);
					} catch (final Exception e) {
					}
				}
				if (g == null) {
					continue;
				}

				Object value = null;
				try {
					value = g.invoke(instance);
				} catch (final Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}

				dialog.addItem(name, value);
			}
		}

		return dialog;
	}