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

public final Enum StubMethod

extends Enum<StubMethod>
implements Composable, ByteCodeAppender
Class Inheritance
All Implemented Interfaces
org.easymock.bytebuddy.implementation.bytecode.ByteCodeAppender, org.easymock.bytebuddy.implementation.Implementation.Composable, org.easymock.bytebuddy.implementation.Implementation, org.easymock.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
Imports
org.easymock.bytebuddy.description.method.MethodDescription, org.easymock.bytebuddy.dynamic.scaffold.InstrumentedType, org.easymock.bytebuddy.implementation.bytecode.ByteCodeAppender, .StackManipulation, org.easymock.bytebuddy.implementation.bytecode.constant.DefaultValue, org.easymock.bytebuddy.implementation.bytecode.member.MethodReturn, org.easymock.bytebuddy.jar.asm.MethodVisitor

This implementation creates a method stub which does nothing but returning the default value of the return type of the method. These default values are:
  1. The value 0 for all numeric type.
  2. The null character for the char type.
  3. false for the boolean type.
  4. Nothing for void types.
  5. A null reference for any reference types. Note that this includes primitive wrapper types.

Field Summary

Modifier and TypeField and Description
public static final StubMethod
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Implementation
andThen(Implementation
The subsequent implementation.
implementation
)

Implements org.easymock.bytebuddy.implementation.Implementation.Composable.andThen.

Appends the supplied implementation to this implementation.
public Implementation.Composable
andThen(Implementation.Composable
The subsequent composable implementation.
implementation
)

Implements org.easymock.bytebuddy.implementation.Implementation.Composable.andThen.

Appends the supplied composable implementation to this implementation.
public ByteCodeAppender
appender(Implementation.Target
The target of the current implementation.
implementationTarget
)

Implements org.easymock.bytebuddy.implementation.Implementation.appender.

Creates a byte code appender that determines the implementation of the instrumented type's methods.
public ByteCodeAppender.Size
apply(MethodVisitor
The method visitor to which the byte code appender writes its code to.
methodVisitor
,
Implementation.Context
The implementation context of the current type creation process.
implementationContext
,
MethodDescription
The method that is the target of the instrumentation.
instrumentedMethod
)

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

Applies this byte code appender to a type creation process.
public InstrumentedType
prepare(InstrumentedType
The instrumented type in its current form.
instrumentedType
)

Implements org.easymock.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Prepares a given instrumented type.
public static StubMethod
public static StubMethod[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final StubMethod INSTANCE

The singleton instance.

Constructor Detail

StubMethodback to summary
private StubMethod()

Method Detail

andThenback to summary
public Implementation andThen(Implementation implementation)

Implements org.easymock.bytebuddy.implementation.Implementation.Composable.andThen.

Doc from org.easymock.bytebuddy.implementation.Implementation.Composable.andThen.

Appends the supplied implementation to this implementation.

Parameters
implementation:Implementation

The subsequent implementation.

Returns:Implementation

An implementation that combines this implementation with the provided one.

andThenback to summary
public Implementation.Composable andThen(Implementation.Composable implementation)

Implements org.easymock.bytebuddy.implementation.Implementation.Composable.andThen.

Doc from org.easymock.bytebuddy.implementation.Implementation.Composable.andThen.

Appends the supplied composable implementation to this implementation.

Parameters
implementation:Implementation.Composable

The subsequent composable implementation.

Returns:Implementation.Composable

A composable implementation that combines this implementation with the provided one.

appenderback to summary
public ByteCodeAppender appender(Implementation.Target implementationTarget)

Implements org.easymock.bytebuddy.implementation.Implementation.appender.

Doc from org.easymock.bytebuddy.implementation.Implementation.appender.

Creates a byte code appender that determines the implementation of the instrumented type's methods.

Parameters
implementationTarget:Implementation.Target

The target of the current implementation.

Returns:ByteCodeAppender

A byte code appender for implementing methods delegated to this implementation. This byte code appender is also responsible for handling methods that were added by this implementation on the call to Implementation#prepare(InstrumentedType).

applyback to summary
public ByteCodeAppender.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)

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

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

Applies this byte code appender to a type creation process.

Parameters
methodVisitor:MethodVisitor

The method visitor to which the byte code appender writes its code to.

implementationContext:Implementation.Context

The implementation context of the current type creation process.

instrumentedMethod:MethodDescription

The method that is the target of the instrumentation.

Returns:ByteCodeAppender.Size

The required size for the applied byte code to run.

prepareback to summary
public InstrumentedType prepare(InstrumentedType instrumentedType)

Implements org.easymock.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Doc from org.easymock.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Prepares a given instrumented type.

Parameters
instrumentedType:InstrumentedType

The instrumented type in its current form.

Returns:InstrumentedType

The prepared instrumented type.

valueOfback to summary
public static StubMethod valueOf(String name)
valuesback to summary
public static StubMethod[] values()