# Class ClassStack

java.lang.Object
org.apache.bcel.util.ClassStack

public class ClassStack extends Object
Utility class implementing a (typesafe) stack of JavaClass objects.

See Also:
  - `Stack`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassStack()`
  Constructs a new ClassStack.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `empty()`
  Checks if the stack is empty.
  `JavaClass`
  `pop()`
  Pops a JavaClass from the stack.
  `void`
  `push(JavaClass clazz)`
  Pushes a JavaClass onto the stack.
  `JavaClass`
  `top()`
  Gets the top JavaClass from the stack without removing it.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ClassStack

    public ClassStack()
    Constructs a new ClassStack.

- ## Method Details

  - ### empty

    public boolean empty()
    Checks if the stack is empty.
    Returns:
      true if the stack is empty.

  - ### pop

    public JavaClass pop()
    Pops a JavaClass from the stack.
    Returns:
      the JavaClass from the top of the stack.

  - ### push

    public void push(JavaClass clazz)
    Pushes a JavaClass onto the stack.
    Parameters:
      `clazz` - the JavaClass to push.

  - ### top

    public JavaClass top()
    Gets the top JavaClass from the stack without removing it.
    Returns:
      the JavaClass at the top of the stack.