Top Description Fields Constructors Methods
org.easymock.bytebuddy.implementation.bytecode.assign

public Class InstanceCheck

extends AbstractBase
Class Inheritance
Annotations
@Enhance
Imports
org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.description.type.TypeDescription, org.easymock.bytebuddy.implementation.Implementation, org.easymock.bytebuddy.implementation.bytecode.StackManipulation, org.easymock.bytebuddy.jar.asm.MethodVisitor, .Opcodes

Implements an instanceof check.

Field Summary

Modifier and TypeField and Description
private final TypeDescription
typeDescription

The type to apply the instance check against.

Constructor Summary

AccessConstructor and Description
protected
InstanceCheck(TypeDescription
The type to apply the instance check against.
typeDescription
)

Creates a new instance check.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation.Size
apply(MethodVisitor
The method visitor used to write the method implementation to.
methodVisitor
,
Implementation.Context
The context of the current implementation.
implementationContext
)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.
public static StackManipulation

Returns:

An appropriate stack manipulation.
of
(TypeDescription
The type to apply the instance check against.
typeDescription
)

Creates a new instance check.

Inherited from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase:
isValid

Field Detail

typeDescriptionback to summary
private final TypeDescription typeDescription

The type to apply the instance check against.

Constructor Detail

InstanceCheckback to summary
protected InstanceCheck(TypeDescription typeDescription)

Creates a new instance check.

Parameters
typeDescription:TypeDescription

The type to apply the instance check against.

Method Detail

applyback to summary
public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.

Parameters
methodVisitor:MethodVisitor

The method visitor used to write the method implementation to.

implementationContext:Implementation.Context

The context of the current implementation.

Returns:StackManipulation.Size

The changes to the size of the operand stack that are implied by this stack manipulation.

ofback to summary
public static StackManipulation of(TypeDescription typeDescription)

Creates a new instance check.

Parameters
typeDescription:TypeDescription

The type to apply the instance check against.

Returns:StackManipulation

An appropriate stack manipulation.