Name
Package java.lang.instrument
Synopsis
This package defines the API for instrumenting a Java VM by transforming class files to add profiling support, code coverage testing, or other features.
The -javaagent
command-line option to the Java
interpreter provides a hook for running the premain(
)
method of a Java instrumentation
agent. An Instrumentation
object passed to the premain( )
method provides an
entry point into this package, and methods of
Instrumentation
allow loaded classes to be
redefined and ClassFileTransformer
objects to be
registered for classes not yet loaded.
Interfaces
public interface ClassFileTransformer; public interface Instrumentation;
Classes
public final class ClassDefinition;
Exceptions
public class IllegalClassFormatException extends Exception; public class UnmodifiableClassException extends Exception;
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.