Class Scriptlet


  • public final class Scriptlet
    extends java.lang.Object
    Contains a simple script (scriptlet).

    A scriptlet is a small script that is commonly found in a scripting XML file. The scriptlet is composed of two parts: the prefix - which is the script language followed by a colon (":"), and the script. Example: groovy:return foo.bar();.

    • Constructor Summary

      Constructors 
      Constructor Description
      Scriptlet​(java.lang.String script)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object executeScript​(java.util.Map<java.lang.String,​java.lang.Object> context)
      Executes the scriptlet and returns the result.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Scriptlet

        public Scriptlet​(java.lang.String script)
    • Method Detail

      • executeScript

        public java.lang.Object executeScript​(java.util.Map<java.lang.String,​java.lang.Object> context)
                                       throws java.lang.Exception
        Executes the scriptlet and returns the result.
        Parameters:
        context - The script bindings
        Returns:
        The scriptlet result
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object