On this page:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
16 rates
This topic discusses Lambda expressions, a Java language feature introduced in Java 8 that enables a functional style of programming in Java.

About Java Lambda

Here's a short example:

LambdaMethodInterface i = (acc, x) -> acc + x;

In the JVM, this creates an anonymous instance of the associated FunctionalInterface, as shown below:

package jdk8;
 
@java.lang.FunctionalInterface
interface LambdaMethodInterface
{
    int sum(int acc, int x);
}

Instrumenting Java Lambda

To instrument lambda instances, create a POJO business transaction match rule for the LambdaMethodInterface, for example:

This sample rule matches classes that implement the interface name jdk8.LambdaMethodInterface

  • No labels