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

com.ui4j.bytebuddy.package-info Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
/**
 * Byte Buddy is a library for creating Java classes at runtime of a Java program. For this purpose, the
 * {@link com.ui4j.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 com.ui4j.bytebuddy;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy