|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.tools.shell.completion.ReflectionCompletor
class ReflectionCompletor
Completes fields and methods of Classes or instances. Does not quite respect the contract of IdentifierCompletor, as last Token may be a dot or not, thus also returns as int the cursor position.
Property Summary | |
---|---|
Groovysh |
shell
|
Constructor Summary | |
ReflectionCompletor(Groovysh shell)
|
Method Summary | |
---|---|
static boolean
|
acceptName(java.lang.String name, java.lang.String prefix)
|
int
|
complete(java.util.List tokens, java.util.List candidates)
|
java.lang.Object
|
getInvokerClassOrInstance(java.util.List groovySourceTokens)
Takes the last ? |
static java.util.List
|
getInvokerTokens(java.util.List groovySourceTokens)
return the last tokens of a list that form an expression to be completed after the next dot, or null if expression cannot be detected. |
static java.util.Collection
|
getPublicFieldsAndMethods(java.lang.Object instance, java.lang.String prefix)
Build a list of public fields and methods for an object that match a given prefix. |
static java.lang.String
|
tokenListToEvalString(java.util.List groovySourceTokens)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Property Detail |
---|
Groovysh shell
Constructor Detail |
---|
ReflectionCompletor(Groovysh shell)
Method Detail |
---|
static boolean acceptName(java.lang.String name, java.lang.String prefix)
int complete(java.util.List tokens, java.util.List candidates)
java.lang.Object getInvokerClassOrInstance(java.util.List groovySourceTokens)
static java.util.List getInvokerTokens(java.util.List groovySourceTokens)
static java.util.Collection getPublicFieldsAndMethods(java.lang.Object instance, java.lang.String prefix)
instance
- the objectprefix
- the prefix that must be matched
static java.lang.String tokenListToEvalString(java.util.List groovySourceTokens)
Groovy Documentation