Top Description Inners Fields Constructors Methods
org.easymock.bytebuddy.implementation.bytecode.member

public final Enum FieldAccess

extends Enum<FieldAccess>
Class Inheritance
Imports
org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.description.enumeration.EnumerationDescription, org.easymock.bytebuddy.description.field.FieldDescription, .FieldList, org.easymock.bytebuddy.description.type.TypeDefinition, org.easymock.bytebuddy.implementation.Implementation, org.easymock.bytebuddy.implementation.bytecode.StackManipulation, .StackSize, org.easymock.bytebuddy.implementation.bytecode.assign.TypeCasting, org.easymock.bytebuddy.jar.asm.MethodVisitor, .Opcodes

An access representation to a given field.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
FieldAccess.AccessDispatcher

A dispatcher for implementing a non-generic read or write access on a field.

public static interface
FieldAccess.Defined

Representation of a field access for which a getter and a setter can be created.

protected static class
FieldAccess.OfGenericField

A dispatcher for implementing a generic read or write access on a field.

Field Summary

Modifier and TypeField and Description
private final int
getterOpcode

The opcode for getting a field value.

public static final FieldAccess
INSTANCE

The representation of field access to an instance field.

private final int
putterOpcode

The opcode for setting a field value.

public static final FieldAccess
STATIC

The representation of field access to a static field.

private final int
targetSizeChange

The amount of operand slots this field access operation consumes when it is applied before eventually adding new values onto the operand stack.

Constructor Summary

AccessConstructor and Description
private
FieldAccess(int
The opcode for setting a field value.
putterOpcode
,
int
The opcode for getting a field value.
getterOpcode
,
StackSize
The amount of operand slots this field access operation consumes when it is applied before eventually adding new values onto the operand stack.
targetSizeChange
)

Creates a new field access.

Method Summary

Modifier and TypeMethod and Description
public static StackManipulation

Returns:

A stack manipulation for reading the enumeration.
forEnumeration
(EnumerationDescription
The description of the enumeration.
enumerationDescription
)

Creates an accessor to read an enumeration value.

public static FieldAccess.Defined

Returns:

A field access definition for the given field.
forField
(FieldDescription.InDefinedShape
The field to be accessed.
fieldDescription
)

Creates a field access representation for a given field.

public static FieldAccess.Defined

Returns:

A field access definition for the given field.
forField
(FieldDescription
The field to be accessed.
fieldDescription
)

Creates a field access representation for a given field.

public static FieldAccess
public static FieldAccess[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

getterOpcodeback to summary
private final int getterOpcode

The opcode for getting a field value.

INSTANCEback to summary
public static final FieldAccess INSTANCE

The representation of field access to an instance field.

putterOpcodeback to summary
private final int putterOpcode

The opcode for setting a field value.

STATICback to summary
public static final FieldAccess STATIC

The representation of field access to a static field.

targetSizeChangeback to summary
private final int targetSizeChange

The amount of operand slots this field access operation consumes when it is applied before eventually adding new values onto the operand stack.

Constructor Detail

FieldAccessback to summary
private FieldAccess(int putterOpcode, int getterOpcode, StackSize targetSizeChange)

Creates a new field access.

Parameters
putterOpcode:int

The opcode for setting a field value.

getterOpcode:int

The opcode for getting a field value.

targetSizeChange:StackSize

The amount of operand slots this field access operation consumes when it is applied before eventually adding new values onto the operand stack.

Method Detail

forEnumerationback to summary
public static StackManipulation forEnumeration(EnumerationDescription enumerationDescription)

Creates an accessor to read an enumeration value.

Parameters
enumerationDescription:EnumerationDescription

The description of the enumeration.

Returns:StackManipulation

A stack manipulation for reading the enumeration.

forFieldback to summary
public static FieldAccess.Defined forField(FieldDescription.InDefinedShape fieldDescription)

Creates a field access representation for a given field.

Parameters
fieldDescription:FieldDescription.InDefinedShape

The field to be accessed.

Returns:FieldAccess.Defined

A field access definition for the given field.

forFieldback to summary
public static FieldAccess.Defined forField(FieldDescription fieldDescription)

Creates a field access representation for a given field. If the field's return type derives from its declared shape, the value is additionally casted to the generically resolved field.

Parameters
fieldDescription:FieldDescription

The field to be accessed.

Returns:FieldAccess.Defined

A field access definition for the given field.

valueOfback to summary
public static FieldAccess valueOf(String name)
valuesback to summary
public static FieldAccess[] values()
org.easymock.bytebuddy.implementation.bytecode.member back to summary

protected Class FieldAccess.AccessDispatcher

extends Object
implements Defined
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher
All Implemented Interfaces
org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined
Annotations
@Enhance
includeSyntheticFields:true

A dispatcher for implementing a non-generic read or write access on a field.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract class
FieldAccess.AccessDispatcher.AbstractFieldInstruction

An abstract base implementation for accessing a field value.

protected class
FieldAccess.AccessDispatcher.FieldGetInstruction

A reading field access operation.

protected class
FieldAccess.AccessDispatcher.FieldPutInstruction

A writing field access operation.

Field Summary

Modifier and TypeField and Description
private final FieldDescription.InDefinedShape
fieldDescription

A description of the accessed field.

Constructor Summary

AccessConstructor and Description
protected
AccessDispatcher(FieldDescription.InDefinedShape
A description of the accessed field.
fieldDescription
)

Creates a new access dispatcher.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation
read()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.read.

Creates a getter representation for a given field.
public StackManipulation
write()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.write.

Creates a setter representation for a given field.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldDescriptionback to summary
private final FieldDescription.InDefinedShape fieldDescription

A description of the accessed field.

Constructor Detail

AccessDispatcherback to summary
protected AccessDispatcher(FieldDescription.InDefinedShape fieldDescription)

Creates a new access dispatcher.

Parameters
fieldDescription:FieldDescription.InDefinedShape

A description of the accessed field.

Method Detail

readback to summary
public StackManipulation read()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.read.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.read.

Creates a getter representation for a given field.

Returns:StackManipulation

A stack manipulation representing the retrieval of a field value.

writeback to summary
public StackManipulation write()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.write.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.write.

Creates a setter representation for a given field.

Returns:StackManipulation

A stack manipulation representing the setting of a field value.

org.easymock.bytebuddy.implementation.bytecode.member back to summary

private abstract Class FieldAccess.AccessDispatcher.AbstractFieldInstruction

extends AbstractBase
Class Inheritance
Known Direct Subclasses
org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.FieldGetInstruction, org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.FieldPutInstruction

An abstract base implementation for accessing a field value.

Constructor Summary

AccessConstructor and Description
private

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.
protected abstract int

Returns:

The opcode for implementing the field access.
getOpcode
()

Returns the opcode for implementing the field access.

protected abstract StackManipulation.Size

Returns:

The size of the field access operation based on the field's size.
resolveSize
(StackSize
The size of the accessed field.
fieldSize
)

Resolves the actual size of this field access operation.

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

Constructor Detail

AbstractFieldInstructionback to summary
private AbstractFieldInstruction()

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.

getOpcodeback to summary
protected abstract int getOpcode()

Returns the opcode for implementing the field access.

Returns:int

The opcode for implementing the field access.

resolveSizeback to summary
protected abstract StackManipulation.Size resolveSize(StackSize fieldSize)

Resolves the actual size of this field access operation.

Parameters
fieldSize:StackSize

The size of the accessed field.

Returns:StackManipulation.Size

The size of the field access operation based on the field's size.

org.easymock.bytebuddy.implementation.bytecode.member back to summary

protected Class FieldAccess.AccessDispatcher.FieldGetInstruction

extends AbstractFieldInstruction
Class Inheritance
Annotations
@Enhance
includeSyntheticFields:true

A reading field access operation.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected int
protected StackManipulation.Size
resolveSize(StackSize
The size of the accessed field.
fieldSize
)

Implements abstract org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.resolveSize.

Resolves the actual size of this field access operation.
Inherited from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction:
apply

Constructor Detail

FieldGetInstructionback to summary
protected FieldGetInstruction()

Method Detail

getOpcodeback to summary
protected int getOpcode()

Implements abstract org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.getOpcode.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.getOpcode.

Returns the opcode for implementing the field access.

Returns:int

The opcode for implementing the field access.

Annotations
@Override
resolveSizeback to summary
protected StackManipulation.Size resolveSize(StackSize fieldSize)

Implements abstract org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.resolveSize.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.resolveSize.

Resolves the actual size of this field access operation.

Parameters
fieldSize:StackSize

The size of the accessed field.

Returns:StackManipulation.Size

The size of the field access operation based on the field's size.

Annotations
@Override
org.easymock.bytebuddy.implementation.bytecode.member back to summary

protected Class FieldAccess.AccessDispatcher.FieldPutInstruction

extends AbstractFieldInstruction
Class Inheritance
Annotations
@Enhance
includeSyntheticFields:true

A writing field access operation.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected int
protected StackManipulation.Size
resolveSize(StackSize
The size of the accessed field.
fieldSize
)

Implements abstract org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.resolveSize.

Resolves the actual size of this field access operation.
Inherited from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction:
apply

Constructor Detail

FieldPutInstructionback to summary
protected FieldPutInstruction()

Method Detail

getOpcodeback to summary
protected int getOpcode()

Implements abstract org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.getOpcode.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.getOpcode.

Returns the opcode for implementing the field access.

Returns:int

The opcode for implementing the field access.

Annotations
@Override
resolveSizeback to summary
protected StackManipulation.Size resolveSize(StackSize fieldSize)

Implements abstract org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.resolveSize.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher.AbstractFieldInstruction.resolveSize.

Resolves the actual size of this field access operation.

Parameters
fieldSize:StackSize

The size of the accessed field.

Returns:StackManipulation.Size

The size of the field access operation based on the field's size.

Annotations
@Override
org.easymock.bytebuddy.implementation.bytecode.member back to summary

public Interface FieldAccess.Defined

Known Direct Implementers
org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.OfGenericField, org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.AccessDispatcher

Representation of a field access for which a getter and a setter can be created.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation

Returns:

A stack manipulation representing the retrieval of a field value.
read
()

Creates a getter representation for a given field.

public StackManipulation

Returns:

A stack manipulation representing the setting of a field value.
write
()

Creates a setter representation for a given field.

Method Detail

readback to summary
public StackManipulation read()

Creates a getter representation for a given field.

Returns:StackManipulation

A stack manipulation representing the retrieval of a field value.

writeback to summary
public StackManipulation write()

Creates a setter representation for a given field.

Returns:StackManipulation

A stack manipulation representing the setting of a field value.

org.easymock.bytebuddy.implementation.bytecode.member back to summary

protected Class FieldAccess.OfGenericField

extends Object
implements Defined
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.OfGenericField
All Implemented Interfaces
org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined
Annotations
@Enhance

A dispatcher for implementing a generic read or write access on a field.

Field Summary

Modifier and TypeField and Description
private final FieldAccess.Defined
defined

An accessor for the field in its defined shape.

private final TypeDefinition
targetType

The resolved generic field type.

Constructor Summary

AccessConstructor and Description
protected
OfGenericField(TypeDefinition
The resolved generic field type.
targetType
,
FieldAccess.Defined
An accessor for the field in its defined shape.
defined
)

Creates a new dispatcher for a generic field.

Method Summary

Modifier and TypeMethod and Description
protected static FieldAccess.Defined

Returns:

A field access dispatcher for the given field.
of
(FieldDescription
The field that is being accessed.
fieldDescription
,
FieldAccess.Defined
A field accessor for the field in its defined shape.
fieldAccess
)

Creates a generic access dispatcher for a given field.

public StackManipulation
read()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.read.

Creates a getter representation for a given field.
public StackManipulation
write()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.write.

Creates a setter representation for a given field.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

definedback to summary
private final FieldAccess.Defined defined

An accessor for the field in its defined shape.

targetTypeback to summary
private final TypeDefinition targetType

The resolved generic field type.

Constructor Detail

OfGenericFieldback to summary
protected OfGenericField(TypeDefinition targetType, FieldAccess.Defined defined)

Creates a new dispatcher for a generic field.

Parameters
targetType:TypeDefinition

The resolved generic field type.

defined:FieldAccess.Defined

An accessor for the field in its defined shape.

Method Detail

ofback to summary
protected static FieldAccess.Defined of(FieldDescription fieldDescription, FieldAccess.Defined fieldAccess)

Creates a generic access dispatcher for a given field.

Parameters
fieldDescription:FieldDescription

The field that is being accessed.

fieldAccess:FieldAccess.Defined

A field accessor for the field in its defined shape.

Returns:FieldAccess.Defined

A field access dispatcher for the given field.

readback to summary
public StackManipulation read()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.read.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.read.

Creates a getter representation for a given field.

Returns:StackManipulation

A stack manipulation representing the retrieval of a field value.

writeback to summary
public StackManipulation write()

Implements org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.write.

Doc from org.easymock.bytebuddy.implementation.bytecode.member.FieldAccess.Defined.write.

Creates a setter representation for a given field.

Returns:StackManipulation

A stack manipulation representing the setting of a field value.