@HashCodeAndEqualsPlugin.Enhance public static class TypeWriter.MethodPool.Record.ForDefinedMethod.WithBody extends TypeWriter.MethodPool.Record.ForDefinedMethod
TypeWriter.MethodPool.Record.ForDefinedMethod.OfVisibilityBridge, TypeWriter.MethodPool.Record.ForDefinedMethod.WithAnnotationDefaultValue, TypeWriter.MethodPool.Record.ForDefinedMethod.WithBody, TypeWriter.MethodPool.Record.ForDefinedMethod.WithoutBody
TypeWriter.MethodPool.Record.AccessBridgeWrapper, TypeWriter.MethodPool.Record.ForDefinedMethod, TypeWriter.MethodPool.Record.ForNonImplementedMethod, TypeWriter.MethodPool.Record.Sort
Constructor and Description |
---|
WithBody(MethodDescription methodDescription,
ByteCodeAppender byteCodeAppender)
Creates a new record for an implemented method without attributes or a modifier resolver.
|
WithBody(MethodDescription methodDescription,
ByteCodeAppender byteCodeAppender,
MethodAttributeAppender methodAttributeAppender,
Visibility visibility)
Creates a new entry for a method that defines a method as byte code.
|
Modifier and Type | Method and Description |
---|---|
void |
applyAttributes(MethodVisitor methodVisitor,
AnnotationValueFilter.Factory annotationValueFilterFactory)
Applies the attributes of this entry.
|
void |
applyBody(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
AnnotationValueFilter.Factory annotationValueFilterFactory)
Applies the body of this entry.
|
ByteCodeAppender.Size |
applyCode(MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the code of this entry.
|
void |
applyHead(MethodVisitor methodVisitor)
Applies the head of this entry.
|
MethodDescription |
getMethod()
Returns the method that is implemented where the returned method resembles a potential transformation.
|
TypeWriter.MethodPool.Record.Sort |
getSort()
Returns the sort of this method instrumentation.
|
Visibility |
getVisibility()
The visibility to enforce for this method.
|
TypeWriter.MethodPool.Record |
prepend(ByteCodeAppender byteCodeAppender)
Prepends the given method appender to this entry.
|
apply
public WithBody(MethodDescription methodDescription, ByteCodeAppender byteCodeAppender)
methodDescription
- The implemented method.byteCodeAppender
- The byte code appender to apply.public WithBody(MethodDescription methodDescription, ByteCodeAppender byteCodeAppender, MethodAttributeAppender methodAttributeAppender, Visibility visibility)
methodDescription
- The implemented method.byteCodeAppender
- The byte code appender to apply.methodAttributeAppender
- The method attribute appender to apply.visibility
- The represented method's minimum visibility.public MethodDescription getMethod()
TypeWriter.MethodPool.Record.Sort.SKIPPED
.public TypeWriter.MethodPool.Record.Sort getSort()
public Visibility getVisibility()
public void applyHead(MethodVisitor methodVisitor)
TypeWriter.MethodPool.Record.Sort.SKIPPED
.methodVisitor
- The method visitor to which this entry should be applied.public void applyBody(MethodVisitor methodVisitor, Implementation.Context implementationContext, AnnotationValueFilter.Factory annotationValueFilterFactory)
TypeWriter.MethodPool.Record.Sort.IMPLEMENTED
.methodVisitor
- The method visitor to which this entry should be applied.implementationContext
- The implementation context to which this entry should be applied.annotationValueFilterFactory
- The annotation value filter factory to apply when writing annotations.public void applyAttributes(MethodVisitor methodVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)
TypeWriter.MethodPool.Record.Sort.DEFINED
.methodVisitor
- The method visitor to which this entry should be applied.annotationValueFilterFactory
- The annotation value filter factory to apply when writing annotations.public ByteCodeAppender.Size applyCode(MethodVisitor methodVisitor, Implementation.Context implementationContext)
TypeWriter.MethodPool.Record.Sort.IMPLEMENTED
.methodVisitor
- The method visitor to which this entry should be applied.implementationContext
- The implementation context to which this entry should be applied.public TypeWriter.MethodPool.Record prepend(ByteCodeAppender byteCodeAppender)
byteCodeAppender
- The byte code appender to prepend.Copyright © 2014–2020. All rights reserved.