java.lang.Object
org.glavo.classfile.impl.BufferedMethodBuilder
- All Implemented Interfaces:
Consumer<MethodElement>,ClassfileBuilder<MethodElement,,MethodBuilder> MethodInfo,TerminalMethodBuilder,MethodBuilder
public final class BufferedMethodBuilder
extends Object
implements TerminalMethodBuilder, MethodInfo
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBufferedMethodBuilder(SplitConstantPool constantPool, Utf8Entry nameInfo, Utf8Entry typeInfo, MethodModel original) -
Method Summary
Modifier and TypeMethodDescriptionbufferedCodeBuilder(CodeModel original) Returns the constant pool builder associated with this builder.intoriginal()Returns theMethodModelrepresenting the method being transformed, if this method builder represents the transformation of someMethodModel.intparameterSlot(int paramNo) run(Consumer<? super MethodBuilder> handler) toModel()transformCode(CodeModel code, CodeTransform transform) Build the method body for this method by transforming the body of another method.with(MethodElement element) Integrate theClassfileElementinto the entity being built.withCode(Consumer<? super CodeBuilder> handler) Build the method body for this method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glavo.classfile.ClassfileBuilder
accept, canWriteDirect, transformMethods inherited from interface org.glavo.classfile.MethodBuilder
withFlags, withFlagsMethods inherited from interface org.glavo.classfile.impl.MethodInfo
receiverSlot
-
Constructor Details
-
BufferedMethodBuilder
public BufferedMethodBuilder(SplitConstantPool constantPool, Utf8Entry nameInfo, Utf8Entry typeInfo, MethodModel original)
-
-
Method Details
-
with
Description copied from interface:ClassfileBuilderIntegrate theClassfileElementinto the entity being built.- Specified by:
within interfaceClassfileBuilder<MethodElement,MethodBuilder> - Parameters:
element- the element- Returns:
- this builder
-
constantPool
Description copied from interface:ClassfileBuilderReturns the constant pool builder associated with this builder.- Specified by:
constantPoolin interfaceClassfileBuilder<MethodElement,MethodBuilder> - Returns:
- the constant pool builder associated with this builder
-
original
Description copied from interface:MethodBuilderReturns theMethodModelrepresenting the method being transformed, if this method builder represents the transformation of someMethodModel.- Specified by:
originalin interfaceMethodBuilder- Returns:
- the
MethodModelrepresenting the method being transformed, if this method builder represents the transformation of someMethodModel
-
methodName
- Specified by:
methodNamein interfaceMethodInfo
-
methodType
- Specified by:
methodTypein interfaceMethodInfo
-
methodFlags
public int methodFlags()- Specified by:
methodFlagsin interfaceMethodInfo
-
parameterSlot
public int parameterSlot(int paramNo) - Specified by:
parameterSlotin interfaceMethodInfo
-
withCode
Description copied from interface:MethodBuilderBuild the method body for this method.- Specified by:
withCodein interfaceMethodBuilder- Parameters:
handler- a handler receiving aCodeBuilder- Returns:
- this builder
-
transformCode
Description copied from interface:MethodBuilderBuild the method body for this method by transforming the body of another method.- Specified by:
transformCodein interfaceMethodBuilder- Parameters:
code- the method body to be transformedtransform- the transform to apply to the method body- Returns:
- this builder
-
bufferedCodeBuilder
- Specified by:
bufferedCodeBuilderin interfaceTerminalMethodBuilder
-
run
-
toModel
-