net.bytebuddy.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of byte-buddy-dep Show documentation
Show all versions of byte-buddy-dep Show documentation
Byte Buddy is a Java library for creating Java classes at run time.
This artifact is a build of Byte Buddy with a remaining dependency onto ASM.
You should never depend on this module without repackaging Byte Buddy and ASM into your own namespace.
/**
* Byte Buddy is a library for creating Java classes at runtime of a Java program. For this purpose, the
* {@link net.bytebuddy.ByteBuddy} class serves as an entry point. The following example
*
* Class<?> dynamicType = new ByteBuddy()
* .subclass(Object.class)
* .implement(Serializable.class)
* .intercept(named("toString"), FixedValue.value("Hello World!"))
* .make()
* .load(getClass().getClassLoader(), ClassLoadingStrategy.Default.WRAPPER)
* .getLoaded();
* dynamicType.newInstance().toString; // returns "Hello World!"
* creates a subclass of the {@link java.lang.Object} class which implements the {@link java.io.Serializable}
* interface. The {@link java.lang.Object#toString()} method is overriden to return {@code Hello World!}.
*/
package net.bytebuddy;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy