org.keycloak.scripting

## Class InvocableScript

- java.lang.Object
- - org.keycloak.scripting.InvocableScript

- All Implemented Interfaces:
    Invocable

      public class InvocableScript
      extends Object
      implements Invocable

  Author:
    Thomas Darimont

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvocableScript(ScriptModel script, ScriptEngine scriptEngine)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getInterface(Class<T> clazz)`
    `<T> T` | `getInterface(Object thiz, Class<T> clazz)`
    `boolean` | `hasFunction(String functionName)` Returns true iif the `ScriptEngine` has a function with the given `functionName`.
    `Object` | `invokeFunction(String name, Object... args)`
    `Object` | `invokeMethod(Object thiz, String name, Object... args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InvocableScript

          public InvocableScript(ScriptModel script,
                                 ScriptEngine scriptEngine)

  - ### Method Detail

    - #### invokeMethod

          public Object invokeMethod(Object thiz,
                                     String name,
                                     Object... args)
                              throws ScriptException,
                                     NoSuchMethodException

      Specified by:
        `invokeMethod` in interface `Invocable`
      Throws:
        `ScriptException`
        `NoSuchMethodException`

    - #### invokeFunction

          public Object invokeFunction(String name,
                                       Object... args)
                                throws ScriptException,
                                       NoSuchMethodException

      Specified by:
        `invokeFunction` in interface `Invocable`
      Throws:
        `ScriptException`
        `NoSuchMethodException`

    - #### getInterface

          public <T> T getInterface(Class<T> clazz)

      Specified by:
        `getInterface` in interface `Invocable`

    - #### getInterface

          public <T> T getInterface(Object thiz,
                                    Class<T> clazz)

      Specified by:
        `getInterface` in interface `Invocable`

    - #### hasFunction

          public boolean hasFunction(String functionName)

      Returns true iif the `ScriptEngine` has a function with the given `functionName`.
      Parameters:
        `functionName` -
      Returns:

Copyright © 2016 JBoss by Red Hat. All rights reserved.