Package org.apache.bcel.util
Class ClassStack
- java.lang.Object
-
- org.apache.bcel.util.ClassStack
-
public class ClassStack extends java.lang.ObjectUtility class implementing a (typesafe) stack of JavaClass objects.- See Also:
Stack
-
-
Constructor Summary
Constructors Constructor Description ClassStack()Constructs a new ClassStack.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanempty()Checks if the stack is empty.JavaClasspop()Pops a JavaClass from the stack.voidpush(JavaClass clazz)Pushes a JavaClass onto the stack.JavaClasstop()Gets the top JavaClass from the stack without removing it.
-
-
-
Field Detail
-
stack
private final java.util.Stack<JavaClass> stack
-
-
Method Detail
-
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.
-
-