java.lang.Object
org.glavo.classfile.impl.ChainedMethodBuilder
- All Implemented Interfaces:
Consumer<MethodElement>,ClassfileBuilder<MethodElement,,MethodBuilder> MethodBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionChainedMethodBuilder(MethodBuilder downstream, Consumer<MethodElement> consumer) -
Method Summary
Modifier and TypeMethodDescriptionReturns the constant pool builder associated with this builder.original()Returns theMethodModelrepresenting the method being transformed, if this method builder represents the transformation of someMethodModel.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, withFlags
-
Constructor Details
-
ChainedMethodBuilder
-
-
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
-
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
-
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
-