class DefaultPrompter implements Prompter {

    private static final String PROMPTER_CLASS = "org.codehaus.plexus.components.interactivity.Prompter";
    private final PlexusContainer container;

    @Inject
    public DefaultPrompter(PlexusContainer container) {
        this.container = container;
    }

    @Override
    public String prompt(String message, List<String> possibleValues, String defaultReply) throws PrompterException {
        try {
            Class<?> clazz = container.getContainerRealm().loadClass(PROMPTER_CLASS);
            Object instance = container.lookup(clazz);
            Method method = clazz.getMethod("prompt", String.class, List.class, String.class);
            return (String) method.invoke(instance, message, possibleValues, defaultReply);
        } catch (Exception e) {
            throw new PrompterException("Unable to call prompter", e);
        }
    }

    @Override
    public String promptForPassword(String message) throws PrompterException {<FILL_FUNCTION_BODY>}

    @Override
    public void showMessage(String message) throws PrompterException {
        try {
            Class<?> clazz = container.getContainerRealm().loadClass(PROMPTER_CLASS);
            Object instance = container.lookup(clazz);
            Method method = clazz.getMethod("showMessage", String.class);
            method.invoke(instance, message);
        } catch (Exception e) {
            throw new PrompterException("Unable to call prompter", e);
        }
    }
}

        try {
            Class<?> clazz = container.getContainerRealm().loadClass(PROMPTER_CLASS);
            Object instance = container.lookup(clazz);
            Method method = clazz.getMethod("promptForPassword", String.class);
            return (String) method.invoke(instance, message);
        } catch (Exception e) {
            throw new PrompterException("Unable to call prompter", e);
        }
    
<no_super_class>