# Class Frame

java.lang.Object
org.apache.bcel.verifier.structurals.Frame

public class Frame extends Object
This class represents a JVM execution frame; that means, a local variable array and an operand stack.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static UninitializedObjectType`
  `_this`
  Deprecated.
  Use the getter/setter to access the field as it may be made private in a later release

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Frame(int maxLocals, int maxStack)`
  Constructs a Frame.
  `Frame(LocalVariables locals, OperandStack stack)`
  Constructs a Frame.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  Creates a clone of this frame.
  `boolean`
  `equals(Object o)`
  Checks if this frame equals another object.
  `Frame`
  `getClone()`
  Gets a clone of this frame.
  `LocalVariables`
  `getLocals()`
  Gets the local variables.
  `OperandStack`
  `getStack()`
  Gets the operand stack.
  `static UninitializedObjectType`
  `getThis()`
  Gets the static _this reference.
  `int`
  `hashCode()`
  `static void`
  `setThis(UninitializedObjectType _this)`
  Sets the static _this reference.
  `String`
  `toString()`
  Returns a String representation of the Frame instance.

  ### Methods inherited from class Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### _this

    @Deprecated protected static UninitializedObjectType _this
    Deprecated.
    Use the getter/setter to access the field as it may be made private in a later release
    For instance initialization methods, it is important to remember which instance it is that is not initialized yet. It will be initialized invoking another constructor later. NULL means the instance already *is* initialized.

- ## Constructor Details

  - ### Frame

    public Frame(int maxLocals, int maxStack)
    Constructs a Frame.
    Parameters:
      `maxLocals` - the maximum number of local variables.
      `maxStack` - the maximum stack size.

  - ### Frame

    public Frame(LocalVariables locals, OperandStack stack)
    Constructs a Frame.
    Parameters:
      `locals` - the local variables.
      `stack` - the operand stack.

- ## Method Details

  - ### getThis

    public static UninitializedObjectType getThis()
    Gets the static _this reference.
    Returns:
      the _this.
    Since:
      6.0

  - ### setThis

    public static void setThis(UninitializedObjectType _this)
    Sets the static _this reference.
    Parameters:
      `_this` - the _this to set.
    Since:
      6.0

  - ### clone

    protected Object clone()
    Creates a clone of this frame.
    Overrides:
      `clone` in class `Object`
    Returns:
      a clone of this frame.

  - ### equals

    public boolean equals(Object o)
    Checks if this frame equals another object.
    Overrides:
      `equals` in class `Object`
    Parameters:
      `o` - the object to compare.
    Returns:
      true if equal, false otherwise.

  - ### getClone

    public Frame getClone()
    Gets a clone of this frame.
    Returns:
      a clone of this frame.

  - ### getLocals

    public LocalVariables getLocals()
    Gets the local variables.
    Returns:
      the local variables.

  - ### getStack

    public OperandStack getStack()
    Gets the operand stack.
    Returns:
      the operand stack.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`
    Returns:
      a hash code value for the object.

  - ### toString

    public String toString()
    Returns a String representation of the Frame instance.
    Overrides:
      `toString` in class `Object`