Package net.bytebuddy.agent.builder
Class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory
-
- Enclosing class:
- AgentBuilder.LambdaInstrumentationStrategy
protected static class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory extends java.lang.ObjectA factory that creates instances that represent lambda expressions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.BridgeMethodImplementationImplements an explicit bridge method for a lambda expression.protected static classAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.ConstructorImplementationImplements a lambda class's executing transformer.protected static classAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.FactoryImplementationAn implementation of a instance factory for a lambda expression's class.protected static classAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementationImplements a lambda expression's functional method.protected static classAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.SerializationImplementationImplements thewriteReplacemethod for serializable lambda expressions.
-
Constructor Summary
Constructors Modifier Constructor Description protectedLambdaInstanceFactory(ByteBuddy byteBuddy)Creates a new lambda instance factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]make(java.lang.Object targetTypeLookup, java.lang.String lambdaMethodName, java.lang.Object factoryMethodType, java.lang.Object lambdaMethodType, java.lang.Object targetMethodHandle, java.lang.Object specializedLambdaMethodType, boolean serializable, java.util.List<java.lang.Class<?>> markerInterfaces, java.util.List<?> additionalBridges, java.util.Collection<? extends java.lang.instrument.ClassFileTransformer> classFileTransformers)Applies this lambda meta factory.
-
-
-
Constructor Detail
-
LambdaInstanceFactory
protected LambdaInstanceFactory(ByteBuddy byteBuddy)
Creates a new lambda instance factory.- Parameters:
byteBuddy- The Byte Buddy instance to use for creating lambda objects.
-
-
Method Detail
-
make
public byte[] make(java.lang.Object targetTypeLookup, java.lang.String lambdaMethodName, java.lang.Object factoryMethodType, java.lang.Object lambdaMethodType, java.lang.Object targetMethodHandle, java.lang.Object specializedLambdaMethodType, boolean serializable, java.util.List<java.lang.Class<?>> markerInterfaces, java.util.List<?> additionalBridges, java.util.Collection<? extends java.lang.instrument.ClassFileTransformer> classFileTransformers)Applies this lambda meta factory.- Parameters:
targetTypeLookup- A lookup context representing the creating class of this lambda expression.lambdaMethodName- The name of the lambda expression's represented method.factoryMethodType- The type of the lambda expression's represented method.lambdaMethodType- The type of the lambda expression's factory method.targetMethodHandle- A handle representing the target of the lambda expression's method.specializedLambdaMethodType- A specialization of the type of the lambda expression's represented method.serializable-trueif the lambda expression should be serializable.markerInterfaces- A list of interfaces for the lambda expression to represent.additionalBridges- A list of additional bridge methods to be implemented by the lambda expression.classFileTransformers- A collection of class file transformers to apply when creating the class.- Returns:
- A binary representation of the transformed class file.
-
-