Registry / utility / cglib
library3.3.0javamavenunverified

cglib is a powerful, high performance and quality Code Generation Library used to extend Java classes and implement interfaces at runtime.

<dependency> <groupId>cglib</groupId> <artifactId>cglib</artifactId> <version>3.3.0</version> </dependency>
INSTALL
IMPORT
SIG · CGLIB
C
cglib
utilityjavav3.3.0
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.

Enhancer
net.sf.cglib.proxy.Enhancer

Demonstrates creating a dynamic proxy using cglib Enhancer.

import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; public class CglibExample { public static void main(String[] args) { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(MyClass.class); enhancer.setCallback((MethodInterceptor) (obj, method, args1, proxy) -> { System.out.println("Before method"); Object result = proxy.invokeSuper(obj, args1); System.out.println("After method"); return result; }); MyClass proxy = (MyClass) enhancer.create(); proxy.someMethod(); } } class MyClass { public void someMethod() { System.out.println("Original method"); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.3.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
cglib — mvn dependency:get cglib · libregistry