public static class TypeWriter.MethodPool.Record.ForDefinedMethod.OfVisibilityBridge extends TypeWriter.MethodPool.Record.ForDefinedMethod implements ByteCodeAppender
Modifier and Type | Class and Description |
---|---|
protected static class |
TypeWriter.MethodPool.Record.ForDefinedMethod.OfVisibilityBridge.VisibilityBridge
A method describing a visibility bridge.
|
TypeWriter.MethodPool.Record.ForDefinedMethod.OfVisibilityBridge, TypeWriter.MethodPool.Record.ForDefinedMethod.WithAnnotationDefaultValue, TypeWriter.MethodPool.Record.ForDefinedMethod.WithBody, TypeWriter.MethodPool.Record.ForDefinedMethod.WithoutBody
ByteCodeAppender.Compound, ByteCodeAppender.Simple, ByteCodeAppender.Size
TypeWriter.MethodPool.Record.AccessBridgeWrapper, TypeWriter.MethodPool.Record.ForDefinedMethod, TypeWriter.MethodPool.Record.ForNonDefinedMethod, TypeWriter.MethodPool.Record.Sort
Modifier | Constructor and Description |
---|---|
protected |
OfVisibilityBridge(MethodDescription visibilityBridge,
MethodDescription bridgeTarget,
TypeDescription superClass,
MethodAttributeAppender attributeAppender)
Creates a new record for a visibility bridge.
|
Modifier and Type | Method and Description |
---|---|
ByteCodeAppender.Size |
apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
MethodDescription instrumentedMethod)
Applies this byte code appender to a type creation process.
|
void |
applyBody(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
AnnotationValueFilter.Factory annotationValueFilterFactory)
Applies the body of this entry.
|
void |
applyHead(MethodVisitor methodVisitor)
Applies the head of this entry.
|
boolean |
equals(Object other) |
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.
|
int |
hashCode() |
static TypeWriter.MethodPool.Record |
of(TypeDescription instrumentedType,
MethodDescription bridgeTarget,
MethodAttributeAppender attributeAppender)
Creates a record for a visibility bridge.
|
TypeWriter.MethodPool.Record |
prepend(ByteCodeAppender byteCodeAppender)
Prepends the given method appender to this entry.
|
String |
toString() |
apply
protected OfVisibilityBridge(MethodDescription visibilityBridge, MethodDescription bridgeTarget, TypeDescription superClass, MethodAttributeAppender attributeAppender)
visibilityBridge
- The visibility bridge.bridgeTarget
- The method the visibility bridge invokes.superClass
- The super type of the instrumented type.attributeAppender
- The attribute appender to apply to the visibility bridge.public static TypeWriter.MethodPool.Record of(TypeDescription instrumentedType, MethodDescription bridgeTarget, MethodAttributeAppender attributeAppender)
instrumentedType
- The instrumented type.bridgeTarget
- The target method of the visibility bridge.attributeAppender
- The attribute appender to apply to the visibility bridge.public MethodDescription getMethod()
TypeWriter.MethodPool.Record
TypeWriter.MethodPool.Record.Sort.SKIPPED
.getMethod
in interface TypeWriter.MethodPool.Record
public TypeWriter.MethodPool.Record.Sort getSort()
TypeWriter.MethodPool.Record
getSort
in interface TypeWriter.MethodPool.Record
public Visibility getVisibility()
TypeWriter.MethodPool.Record
getVisibility
in interface TypeWriter.MethodPool.Record
public TypeWriter.MethodPool.Record prepend(ByteCodeAppender byteCodeAppender)
TypeWriter.MethodPool.Record
prepend
in interface TypeWriter.MethodPool.Record
byteCodeAppender
- The byte code appender to prepend.public void applyHead(MethodVisitor methodVisitor)
TypeWriter.MethodPool.Record
TypeWriter.MethodPool.Record.Sort.SKIPPED
.applyHead
in interface TypeWriter.MethodPool.Record
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
TypeWriter.MethodPool.Record.Sort.IMPLEMENTED
.applyBody
in interface TypeWriter.MethodPool.Record
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 ByteCodeAppender.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)
ByteCodeAppender
apply
in interface ByteCodeAppender
methodVisitor
- The method visitor to which the byte code appender writes its code to.implementationContext
- The implementation context of the current type creation process.instrumentedMethod
- The method that is the target of the instrumentation.Copyright © 2014–2016. All rights reserved.