Let's look at each of the highlighted modules above and learn from them.
That module is a direct result of this issue: https://netbeans.org/bugzilla/show_bug.cgi?id=201885 and uses @FunctionInterceptor.Registration.
To see what that single class provides, take a look at how a Prototype sample looked in NetBeans IDE 8.0:
Specifically, look in the Navigator window above, which is not very expressive, compared to the Navigator in the screenshot below, which I took in NetBeans IDE 8.0.2:
Here's part of the code completion that you see implemented via the code completion classes above:
See this tutorial for step by step instructions to create the sample shown in the screenshot above:
And you can see part of the above in action here: