Top Description Fields Constructors Methods
net.bytebuddy.implementation.bytecode

public Class TypeCreation

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

A stack manipulation for creating an undefined type on which a constructor is to be called.

Field Summary

Modifier and TypeField and Description
private final TypeDescription
typeDescription

The type that is being created.

Constructor Summary

AccessConstructor and Description
protected
TypeCreation(TypeDescription
The type to be created.
typeDescription
)

Constructs a new type creation.

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 net.bytebuddy.implementation.bytecode.StackManipulation.apply.

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

Returns:

A stack manipulation that represents the creation of the given type.
of
(TypeDescription
The type to be created.
typeDescription
)

Creates a type creation for the given type.

Inherited from net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase:
isValid

Field Detail

typeDescriptionback to summary
private final TypeDescription typeDescription

The type that is being created.

Constructor Detail

TypeCreationback to summary
protected TypeCreation(TypeDescription typeDescription)

Constructs a new type creation.

Parameters
typeDescription:TypeDescription

The type to be created.

Method Detail

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

Implements net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from net.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 type creation for the given type.

Parameters
typeDescription:TypeDescription

The type to be created.

Returns:StackManipulation

A stack manipulation that represents the creation of the given type.