Package adams.gui.help
Class AbstractHelpGenerator
- java.lang.Object
-
- adams.gui.help.AbstractHelpGenerator
-
- Direct Known Subclasses:
AdamsOptionHandlerHelpGenerator
,DefaultHelpGenerator
,EnumHelpGenerator
,WekaOptionHandlerHelpGenerator
public abstract class AbstractHelpGenerator extends Object
Ancestor for help generator classes.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected static List<AbstractHelpGenerator>
m_Generators
the generators.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractHelpGenerator()
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
generate(Class cls)
Generates and returns the help for the specified class.abstract String
generate(Object obj)
Generates and returns the help for the specified object.static HelpContainer
generateHelp(Class cls, UserMode userMode)
Generates help for the specified class.static HelpContainer
generateHelp(Object obj, UserMode userMode)
Generates help for the specified object.static HelpContainer
generateHelp(String clsName, UserMode userMode)
Generates help for the specified class.abstract boolean
handles(Class cls)
Returns whether this class is handled by this generator.boolean
handles(Object obj)
Returns whether this object is handled by this generator.protected static void
initialize()
For initializing the help generators, if necessary.void
initializeGenerator()
Hook method for initializing the generator.abstract boolean
isHtml(Class cls)
Returns whether the generated help is HTML or plain text.boolean
isHtml(Object obj)
Returns whether the generated help is HTML or plain text.
-
-
-
Field Detail
-
m_Generators
protected static List<AbstractHelpGenerator> m_Generators
the generators.
-
-
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 foruserMode
- 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 foruserMode
- 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 foruserMode
- the user mode to generate the help for- Returns:
- the help container
-
-