All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.newrelic.weave.weavepackage.language.LanguageAdapter Maven / Gradle / Ivy

There is a newer version: 8.17.0
Show newest version
/*
 *
 *  * Copyright 2020 New Relic Corporation. All rights reserved.
 *  * SPDX-License-Identifier: Apache-2.0
 *
 */

package com.newrelic.weave.weavepackage.language;

import java.util.List;

/**
 * A language adapter has a chance to process the input bytes before they are handed to the WeavePackage.
* This allows other JVM languages to define their own weaver api by doing the following: *
    *
  • Extending the weaver api to suite the language of choice
  • *
  • Using {@link LanguageAdapter#adapt(List)}, translate the input bytes into bytes the Java api can process. This * transformation can be defined by the extended api defined in the previous step.
  • *
  • Raise any desired custom violations in the returned {@link LanguageAdapterResult}
  • *
*/ public interface LanguageAdapter { /** * The adapt method will be called before the weave package processes the instrumentation bytes. * * @param input bytes read from disk * @return A {@link LanguageAdapterResult} containing the output bytes and any violations found by the adapter. */ public LanguageAdapterResult adapt(List input); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy