Registry / utility / byte-buddy

byte-buddy

JSON →
library1.18.8javamavenunverified

Byte Buddy is a Java library for creating and modifying Java classes at runtime, with repackaged ASM dependencies.

<dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> <version>1.18.8</version> </dependency>
INSTALL
IMPORT
SIG · BYTE-BUDDY
B
byte-buddy
utilityjavav1.18.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ByteBuddy
✓ net.bytebuddy.ByteBuddy

Creates a dynamic class that overrides toString() to return a fixed value.

import net.bytebuddy.ByteBuddy; import net.bytebuddy.implementation.FixedValue; import net.bytebuddy.matcher.ElementMatchers; public class DynamicClass { public static void main(String[] args) throws Exception { Class<?> dynamicType = new ByteBuddy() .subclass(Object.class) .method(ElementMatchers.named("toString")) .intercept(FixedValue.value("Hello World!")) .make() .load(DynamicClass.class.getClassLoader()) .getLoaded(); System.out.println(dynamicType.newInstance().toString()); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.18.8latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Bingbot
1
Resources
byte-buddy — mvn dependency:get byte-buddy · libregistry