Example usage for org.aspectj.weaver.loadtime Agent premain

List of usage examples for org.aspectj.weaver.loadtime Agent premain

Introduction

In this page you can find the example usage for org.aspectj.weaver.loadtime Agent premain.

Prototype

public static void premain(String options, Instrumentation instrumentation) 

Source Link

Document

JSR-163 preMain Agent entry method

Usage

From source file:kieker.monitoring.probe.aspectj.AspectJLoader.java

License:Apache License

/**
 * JSR-163 preMain entry method./*from   www . ja  va  2 s .c  om*/
 * 
 * @param options
 *            for the weaver agent
 * @param instrumentation
 *            java API instrumentation object
 */
public static void premain(final String options, final Instrumentation instrumentation) {
    if (!AspectJLoader.checkConfigurationFileAvailable()) {
        final URL aspectConfigURL = AspectJLoader.class.getClassLoader().getResource(DEFAULT_AOP_CONFIG);
        LOG.info("No AspectJ configuration file found. Using Kieker's default AspectJ configuration file ("
                + aspectConfigURL + ").");
        AspectJLoader.addKiekerDefaultConfigFile();
    }

    Agent.premain(options, instrumentation);
}