public final class BytecodeTransformerBuildItem extends MultiBuildItem
| Modifier and Type | Class and Description |
|---|---|
static class |
BytecodeTransformerBuildItem.Builder |
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
cacheable |
(package private) String |
classToTransform |
(package private) boolean |
eager
If this is true it means the class should be loaded eagerly by a thread pool in dev mode
on multi threaded systems.
|
(package private) BiFunction<String,byte[],byte[]> |
inputTransformer
Function that can be applied to the inout bytes before it is passed into ASM.
|
(package private) Set<String> |
requireConstPoolEntry
A set of class names that need to be present in the const pool for the transformation to happen.
|
(package private) BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> |
visitorFunction |
| Constructor and Description |
|---|
BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction) |
BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction,
boolean cacheable) |
BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction,
Set<String> requireConstPoolEntry) |
BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction,
Set<String> requireConstPoolEntry,
boolean cacheable) |
BytecodeTransformerBuildItem(BytecodeTransformerBuildItem.Builder builder) |
BytecodeTransformerBuildItem(String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction) |
BytecodeTransformerBuildItem(String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction,
Set<String> requireConstPoolEntry) |
| Modifier and Type | Method and Description |
|---|---|
String |
getClassToTransform() |
BiFunction<String,byte[],byte[]> |
getInputTransformer() |
Set<String> |
getRequireConstPoolEntry() |
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> |
getVisitorFunction() |
boolean |
isCacheable() |
boolean |
isEager() |
final boolean eager
Transformation is expensive, so doing it this way can speed up boot time.
final String classToTransform
final BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction
final BiFunction<String,byte[],byte[]> inputTransformer
final Set<String> requireConstPoolEntry
The transformation is only applied if at least one of the entries in the const pool is present
Note that this is an optimisation, and if another transformer is transforming the class anyway then this transformer will always be applied.
final boolean cacheable
public BytecodeTransformerBuildItem(String classToTransform, BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction)
public BytecodeTransformerBuildItem(String classToTransform, BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction, Set<String> requireConstPoolEntry)
public BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction)
public BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction,
boolean cacheable)
public BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction,
Set<String> requireConstPoolEntry)
public BytecodeTransformerBuildItem(boolean eager,
String classToTransform,
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> visitorFunction,
Set<String> requireConstPoolEntry,
boolean cacheable)
public BytecodeTransformerBuildItem(BytecodeTransformerBuildItem.Builder builder)
public String getClassToTransform()
public BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor> getVisitorFunction()
public boolean isEager()
public boolean isCacheable()
public BiFunction<String,byte[],byte[]> getInputTransformer()
Copyright © 2021 JBoss by Red Hat. All rights reserved.