Package org.beryx.textio
Class AbstractTextTerminal<T extends AbstractTextTerminal<T>>
- java.lang.Object
-
- org.beryx.textio.AbstractTextTerminal<T>
-
- All Implemented Interfaces:
TextTerminal<T>
- Direct Known Subclasses:
ConsoleTextTerminal
,JLineTextTerminal
,MockTextTerminal
,SwingTextTerminal
,SystemTextTerminal
,WebTextTerminal
public abstract class AbstractTextTerminal<T extends AbstractTextTerminal<T>> extends java.lang.Object implements TextTerminal<T>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_USER_INTERRUPT_KEY
static java.lang.String
SYSPROP_PROPERTIES_FILE_LOCATION
-
Constructor Summary
Constructors Constructor Description AbstractTextTerminal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
addDefaultProperty(java.lang.String key, java.lang.String value)
java.util.Map<java.lang.String,java.lang.String>
getDefaultProperties()
TerminalProperties<T>
getProperties()
java.util.List<java.lang.String>
getPropertiesPrefixes()
java.util.Optional<java.io.Reader>
getPropertiesReader()
void
init()
This method is typically called after the terminal has been created.void
initProperties()
void
initProperties(java.io.Reader propsReader)
void
initProperties(java.util.Properties rawProps)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.beryx.textio.TextTerminal
abort, applyWithPropertiesConfigurator, dispose, dispose, executeWithPropertiesConfigurator, executeWithPropertiesPrefix, moveToLineStart, print, print, printf, printf, println, println, println, rawPrint, rawPrint, read, registerHandler, registerUserInterruptHandler, resetLine, resetToBookmark, setBookmark
-
-
-
-
Field Detail
-
SYSPROP_PROPERTIES_FILE_LOCATION
public static final java.lang.String SYSPROP_PROPERTIES_FILE_LOCATION
- See Also:
- Constant Field Values
-
DEFAULT_USER_INTERRUPT_KEY
public static final java.lang.String DEFAULT_USER_INTERRUPT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProperties
public TerminalProperties<T> getProperties()
- Specified by:
getProperties
in interfaceTextTerminal<T extends AbstractTextTerminal<T>>
- Returns:
- the
TerminalProperties
of this text terminal.
-
init
public void init()
Description copied from interface:TextTerminal
This method is typically called after the terminal has been created. The default implementation does nothing.- Specified by:
init
in interfaceTextTerminal<T extends AbstractTextTerminal<T>>
-
getPropertiesPrefixes
public java.util.List<java.lang.String> getPropertiesPrefixes()
-
getDefaultProperties
public final java.util.Map<java.lang.String,java.lang.String> getDefaultProperties()
-
addDefaultProperty
public final java.lang.String addDefaultProperty(java.lang.String key, java.lang.String value)
-
initProperties
public void initProperties()
-
getPropertiesReader
public java.util.Optional<java.io.Reader> getPropertiesReader()
-
initProperties
public void initProperties(java.io.Reader propsReader)
-
initProperties
public void initProperties(java.util.Properties rawProps)
-
-