Class BBClientProxyClassGenerator
java.lang.Object
org.microbean.clientproxy.bytebuddy.BBClientProxyClassGenerator
A class generator that uses Byte Buddy to generate client proxy classes.
- Author:
- Laird Nelson
-
Constructor Summary
ConstructorsConstructorDescriptionBBClientProxyClassGenerator(TypePool typePool) Creates a newBBClientProxyClassGenerator. -
Method Summary
Modifier and TypeMethodDescriptionfinal DynamicType.Unloaded<?> generate(String name, TypeDefinition superclass, Collection<? extends TypeDefinition> interfaces) Creates and returns a newDynamicType.Unloadedrepresenting a client proxy class.
-
Constructor Details
-
BBClientProxyClassGenerator
Creates a newBBClientProxyClassGenerator.- Parameters:
typePool- a non-nullTypePool(normally aTypeElementTypePool)- Throws:
NullPointerException- iftypePoolisnull
-
-
Method Details
-
generate
public final DynamicType.Unloaded<?> generate(String name, TypeDefinition superclass, Collection<? extends TypeDefinition> interfaces) Creates and returns a newDynamicType.Unloadedrepresenting a client proxy class.- Parameters:
name- the non-nullname of the client proxy class; must be a valid Java class binary namesuperclass- a non-nullTypeDefinitionrepresenting a superclassinterfaces- a non-nullCollectionofTypeDefinitions representing interfaces the client proxy class will implement- Returns:
- a new, non-
nullDynamicType.Unloadedrepresenting a client proxy class - Throws:
NullPointerException- if any argument isnull
-