Interface IIvyScriptContext

  • All Superinterfaces:
    Cloneable

    public interface IIvyScriptContext
    extends Cloneable
    This class represents a context to execute instructions. It does this at the moment just by providing some local objects which each has a name.
    API:
    This is a public API.
    • Method Detail

      • getObject

        Object getObject​(String name)
                  throws IvyScriptVariableNotFoundException
        Gets the value of a variable from the context. If the variable is not declared in this context tries the outer context.
        Parameters:
        name - The name of the object to find.
        Returns:
        The value of the variable.
        Throws:
        IvyScriptVariableNotFoundException - An exception is thrown if the variable is not declared.
        API:
        This public API is available in Java.
      • getObjectOrNull

        Object getObjectOrNull​(String name)
        Gets the value of a variable from the context. If the variable is not declared in this context tries the outer context. If the variable is not defined at all returns null.
        Parameters:
        name - The name of the object to find.
        Returns:
        The value of the variable or null if variable is not defined.
        API:
        This public API is available in Java.
      • getVariableNames

        List<String> getVariableNames()
        Gets all variable names
        Returns:
        variable names
        API:
        This public API is available in Java.
      • hasVariable

        boolean hasVariable​(String name)
        Decides whether a variable is declared.
        Parameters:
        name -
        Returns:
        true if given variable is declared, false otherwise.
        API:
        This public API is available in Java.