Class FlexibleCompletor
- java.lang.Object
-
- org.mozilla.javascript.tools.shell.FlexibleCompletor
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
class FlexibleCompletor extends java.lang.Object implements java.lang.reflect.InvocationHandler
The completors provided with JLine are pretty uptight, they only complete on a line that it can fully recognize (only composed of completed strings). This one completes whatever came before.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Method
completeMethod
private Scriptable
global
-
Constructor Summary
Constructors Constructor Description FlexibleCompletor(java.lang.Class<?> completorClass, Scriptable global)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
complete(java.lang.String buffer, int cursor, java.util.List<java.lang.String> candidates)
java.lang.Object
invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
-
-
-
Field Detail
-
completeMethod
private java.lang.reflect.Method completeMethod
-
global
private Scriptable global
-
-
Constructor Detail
-
FlexibleCompletor
FlexibleCompletor(java.lang.Class<?> completorClass, Scriptable global) throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
-
-
Method Detail
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
- Specified by:
invoke
in interfacejava.lang.reflect.InvocationHandler
-
complete
public int complete(java.lang.String buffer, int cursor, java.util.List<java.lang.String> candidates)
-
-