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

jersey.repackaged.org.objectweb.asm.package.html Maven / Gradle / Ivy

Go to download

A bundle containing code of all jar-based modules that provide JAX-RS and Jersey-related features. Such a bundle is *only intended* for developers that do not use Maven's dependency system. The bundle does not include code for contributes, tests and samples.

There is a newer version: 1.19.4
Show newest version



Provides a small and fast bytecode manipulation framework.

The ASM framework is organized around the {@link jersey.repackaged.org.objectweb.asm.ClassVisitor ClassVisitor}, {@link jersey.repackaged.org.objectweb.asm.FieldVisitor FieldVisitor} and {@link jersey.repackaged.org.objectweb.asm.MethodVisitor MethodVisitor} interfaces, which allow one to visit the fields and methods of a class, including the bytecode instructions of each method.

In addition to these main interfaces, ASM provides a {@link jersey.repackaged.org.objectweb.asm.ClassReader ClassReader} class, that can parse an existing class and make a given visitor visit it. ASM also provides a {@link jersey.repackaged.org.objectweb.asm.ClassWriter ClassWriter} class, which is a visitor that generates Java class files.

In order to generate a class from scratch, only the {@link jersey.repackaged.org.objectweb.asm.ClassWriter ClassWriter} class is necessary. Indeed, in order to generate a class, one must just call its visitXXX methods with the appropriate arguments to generate the desired fields and methods. See the "helloworld" example in the ASM distribution for more details about class generation.

In order to modify existing classes, one must use a {@link jersey.repackaged.org.objectweb.asm.ClassReader ClassReader} class to analyze the original class, a class modifier, and a {@link jersey.repackaged.org.objectweb.asm.ClassWriter ClassWriter} to construct the modified class. The class modifier is just a {@link jersey.repackaged.org.objectweb.asm.ClassVisitor ClassVisitor} that delegates most of the work to another {@link jersey.repackaged.org.objectweb.asm.ClassVisitor ClassVisitor}, but that sometimes changes some parameter values, or call additional methods, in order to implement the desired modification process. In order to make it easier to implement such class modifiers, ASM provides the {@link jersey.repackaged.org.objectweb.asm.ClassAdapter ClassAdapter} and {@link jersey.repackaged.org.objectweb.asm.MethodAdapter MethodAdapter} classes, which implement the {@link jersey.repackaged.org.objectweb.asm.ClassVisitor ClassVisitor} and {@link jersey.repackaged.org.objectweb.asm.MethodVisitor MethodVisitor} interfaces by delegating all work to other visitors. See the "adapt" example in the ASM distribution for more details about class modification.

The size of the core ASM library, asm.jar, is only 42KB, which is much smaller than the size of the BCEL library (504KB), and than the size of the SERP library (150KB). ASM is also much faster than these tools. Indeed the overhead of a load time class transformation process is of the order of 60% with ASM, 700% or more with BCEL, and 1100% or more with SERP (see the test/perf directory in the ASM distribution)! @since ASM 1.3





© 2015 - 2024 Weber Informatics LLC | Privacy Policy