Package org.jline.reader
Class Reference
java.lang.Object
org.jline.reader.Reference
- All Implemented Interfaces:
Binding
A reference to a
Widget
by name.
The Reference class is a type of Binding
that refers to a widget by its name
rather than directly holding the widget implementation. When a key sequence bound to
a Reference is pressed, the LineReader will look up the referenced widget by name
and execute it.
This indirection allows for more flexible key bindings, as it enables binding keys to widgets that might be defined or redefined after the key binding is established. It also allows multiple key sequences to reference the same widget without duplicating the widget implementation.
References are particularly useful in configuration files where widgets are referred to by name rather than by direct object references.
- See Also:
-
Constructor Summary
Constructors -
Method Summary