Interface HasFunctionAddress


public interface HasFunctionAddress
A placeholder for an object which has a reference to a function address, but which may not be realized yet. This is particularly important for forward-referenced functions. For example:
 BEGIN { f(3) }
 function f(x) { print x*x }
 
f() is referred to prior to its definition. Therefore, the getFunctionAddress() call within the BEGIN block will not return a meaningful address. However, anytime after f(x) is defined, getFunctionAddress() will return the correct function address.
Author:
Danny Daglas
  • Method Summary

    Modifier and Type
    Method
    Description
    Get an address to the tuple where this function is defined.
  • Method Details

    • getFunctionAddress

      Address getFunctionAddress()
      Get an address to the tuple where this function is defined.

      If getFunctionAddress() is called prior to defining the function address (prior to parsing the function block), the result is undefined. (As of this writing, a NullPointerException is thrown.)

      Returns:
      a Address object