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:
  • 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.