|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.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(String name, String prefix)
|
int
|
complete(List tokens, List candidates)
|
Object
|
getInvokerClassOrInstance(List groovySourceTokens)
Takes the last ? |
static List
|
getInvokerTokens(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 Collection
|
getPublicFieldsAndMethods(Object instance, String prefix)
Build a list of public fields and methods for an object that match a given prefix. |
static String
|
tokenListToEvalString(List groovySourceTokens)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail |
---|
Groovysh shell
Constructor Detail |
---|
ReflectionCompletor(Groovysh shell)
Method Detail |
---|
static boolean acceptName(String name, String prefix)
int complete(List tokens, List candidates)
Object getInvokerClassOrInstance(List groovySourceTokens)
static List getInvokerTokens(List groovySourceTokens)
static Collection getPublicFieldsAndMethods(Object instance, String prefix)
instance
- the objectprefix
- the prefix that must be matched
static String tokenListToEvalString(List groovySourceTokens)
Copyright © 2003-2013 The Codehaus. All rights reserved.