Class AbstractHelpGenerator

    • Constructor Detail

      • AbstractHelpGenerator

        protected AbstractHelpGenerator()
        Default constructor.
    • Method Detail

      • initializeGenerator

        public void initializeGenerator()
        Hook method for initializing the generator.
      • handles

        public abstract boolean handles​(Class cls)
        Returns whether this class is handled by this generator.
        Parameters:
        cls - the class to check
        Returns:
        true if handled
      • handles

        public boolean handles​(Object obj)
        Returns whether this object is handled by this generator.
        Parameters:
        obj - the object to check
        Returns:
        true if handled
      • isHtml

        public abstract boolean isHtml​(Class cls)
        Returns whether the generated help is HTML or plain text.
        Parameters:
        cls - the class to generate the help for
        Returns:
        true if HTML
      • isHtml

        public boolean isHtml​(Object obj)
        Returns whether the generated help is HTML or plain text.
        Parameters:
        obj - the object to generate the help for
        Returns:
        true if HTML
      • generate

        public abstract String generate​(Class cls)
        Generates and returns the help for the specified class.
        Parameters:
        cls - the class to generate the help for
        Returns:
        the help, null if failed to produce
      • generate

        public abstract String generate​(Object obj)
        Generates and returns the help for the specified object.
        Parameters:
        obj - the object to generate the help for
        Returns:
        the help, null if failed to produce
      • initialize

        protected static void initialize()
        For initializing the help generators, if necessary.
      • generateHelp

        public static HelpContainer generateHelp​(String clsName,
                                                 UserMode userMode)
        Generates help for the specified class.
        Parameters:
        clsName - the class to generate the help for
        userMode - the user mode to generate the help for
        Returns:
        the help container or null if failed to instantiate class
      • generateHelp

        public static HelpContainer generateHelp​(Class cls,
                                                 UserMode userMode)
        Generates help for the specified class.
        Parameters:
        cls - the class to generate the help for
        userMode - the user mode to generate the help for
        Returns:
        the help container
      • generateHelp

        public static HelpContainer generateHelp​(Object obj,
                                                 UserMode userMode)
        Generates help for the specified object.
        Parameters:
        obj - the object to generate the help for
        userMode - the user mode to generate the help for
        Returns:
        the help container