Example usage for org.springframework.instrument InstrumentationSavingAgent getInstrumentation

List of usage examples for org.springframework.instrument InstrumentationSavingAgent getInstrumentation

Introduction

In this page you can find the example usage for org.springframework.instrument InstrumentationSavingAgent getInstrumentation.

Prototype

public static Instrumentation getInstrumentation() 

Source Link

Document

Return the Instrumentation interface exposed by the JVM.

Usage

From source file:org.eclipse.core.databinding.pojo.bindable.initializer.instrument.SpringInstrumentationProvider.java

/**
 * Return the instance of {@link Instrumentation} updated with
 * -javaagent:spring-agent.jar//from   ww w .  j  av a 2s  .co m
 */
public Instrumentation getInstrumentation() throws UnavailableInstrumentationException {
    Instrumentation instrumentation = InstrumentationSavingAgent.getInstrumentation();
    if (instrumentation == null) {
        throw new UnavailableInstrumentationException(
                "Instrumentation is null. Call your program with -javaagent:spring-agent.jar");
    }
    return instrumentation;
}