Package adams.core.option.description
Interface ClassDescriptionGenerator
-
- All Known Implementing Classes:
AbstractClassDescriptionGenerator,AdamsClassDescriptionGenerator,WekaClassDescriptionGenerator
public interface ClassDescriptionGeneratorInterface for classes that generate JSON-based descriptions from classes.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_CLASSthe key for the class name.static StringKEY_OPTIONSthe key for the options.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Object>generate(Class cls)Generates the description for the class.Map<String,Object>generate(Object obj)Generates the description for the object.booleanhandles(Class cls)Checks whether this class is handled by this generator.booleanhandles(Object obj)Checks whether this object is handled by this generator.
-
-
-
Field Detail
-
KEY_CLASS
static final String KEY_CLASS
the key for the class name.- See Also:
- Constant Field Values
-
KEY_OPTIONS
static final String KEY_OPTIONS
the key for the options.- See Also:
- Constant Field Values
-
-
Method Detail
-
handles
boolean handles(Object obj)
Checks whether this object is handled by this generator.- Parameters:
obj- the object to check- Returns:
- true if handled
-
handles
boolean handles(Class cls)
Checks whether this class is handled by this generator.- Parameters:
cls- the class to check- Returns:
- true if handled
-
generate
Map<String,Object> generate(Object obj)
Generates the description for the object.- Parameters:
obj- the object to process- Returns:
- the description, null if failed to generate
-
-