public interface ScriptMethodInvoker
Modifier and Type | Method and Description |
---|---|
default void |
cacheInvocableMethods()
Cache the invocable methods for the current installed script.
|
default java.util.Set<CachedMethodKey> |
getInvocableMethods()
Return the invocable methods for the current installed script.
|
default java.util.Map<java.lang.String,java.util.Set<CachedMethodKey>> |
getInvocableMethodsByNames()
Return the invocable methods sorted by their names for the current installed script.
|
default boolean |
hasInvocableMethod(CachedMethodKey key)
Return true if the invoker has an invocation method of a specific key.
|
default java.lang.Object |
invokeMethod(java.lang.String name)
Invoke directly a method without arguments by reflection for the current installed script.
|
default java.lang.Object |
invokeMethod(java.lang.String name,
java.lang.Object... args)
Invoke directly a method by reflection for the current installed script.
|
default boolean |
isAutoCachingInvocableMethods()
Return true if a cache of invocable methods will be created each time the wrapper installs a new
script.
|
default boolean |
isInvocableByName()
Return true if only the name of the method is significant.
|
default boolean |
isInvocableMethodsEnabled()
Return true if invocable methods are enabled for this wrapper.
|
default void |
setAutoCacheInvocableMethods(boolean autoCache)
Set if a cache of invocable methods will be created each time the wrapper installs a new script.
|
default boolean isInvocableMethodsEnabled()
invokeMethod(java.lang.String, java.lang.Object...)
will be implemented for the
wrapper. Return false by default.default boolean isAutoCachingInvocableMethods()
default void setAutoCacheInvocableMethods(boolean autoCache)
autoCache
- true if a cache of invocable methods will be created each time the wrapper installs a new scriptdefault void cacheInvocableMethods()
default java.util.Set<CachedMethodKey> getInvocableMethods()
default java.util.Map<java.lang.String,java.util.Set<CachedMethodKey>> getInvocableMethodsByNames()
default boolean isInvocableByName()
default boolean hasInvocableMethod(CachedMethodKey key)
key
- the keydefault java.lang.Object invokeMethod(java.lang.String name, java.lang.Object... args)
name
- the method nameargs
- the method argumentsdefault java.lang.Object invokeMethod(java.lang.String name)
invokeMethod(java.lang.String, java.lang.Object...)
with an empty arguments array.name
- the method nameCopyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence