Class Invoke

    • Constructor Detail

      • Invoke

        public Invoke​(Metadata metadata,
                      java.lang.String name,
                      ProtelisAST<?> target,
                      java.util.List<ProtelisAST<?>> args)
        Parameters:
        metadata - A Metadata object containing information about the code that generated this AST node.
        name - function (or method) name
        target - Protelis sub-program that annotates itself with the target of this call
        args - arguments of the function
    • Method Detail

      • evaluate

        public java.lang.Object evaluate​(ExecutionContext context)
        Description copied from class: AbstractProtelisAST
        Evaluates this AST node. This method can throw any exception, AbstractProtelisAST takes care of storing the necessary metadata.
        Specified by:
        evaluate in class AbstractProtelisAST<java.lang.Object>
        Parameters:
        context - the execution context
        Returns:
        the result of the evaluation
      • getLeftExpression

        public ProtelisAST<?> getLeftExpression()
        Returns:
        the ProtelisAST representing the invocation receiver
      • isNullable

        protected boolean isNullable()
        Overrides:
        isNullable in class AbstractProtelisAST<java.lang.Object>
        Returns:
        true if this node can get annotated with null values - namely, if it is an interaction with Java