Package org.apache.bcel.util
Class ClassSet
- java.lang.Object
-
- org.apache.bcel.util.ClassSet
-
public class ClassSet extends java.lang.ObjectUtility class implementing a (type-safe) set of JavaClass objects. Since JavaClass has no equals() method, the name of the class is used for comparison.- See Also:
ClassStack
-
-
Constructor Summary
Constructors Constructor Description ClassSet()Constructs a new ClassSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(JavaClass clazz)Adds a JavaClass to the set.booleanempty()Checks if the set is empty.java.lang.String[]getClassNames()Gets the class names in the set.voidremove(JavaClass clazz)Removes a JavaClass from the set.JavaClass[]toArray()Converts the set to an array.
-
-
-
Field Detail
-
map
private final java.util.Map<java.lang.String,JavaClass> map
-
-
Method Detail
-
add
public boolean add(JavaClass clazz)
Adds a JavaClass to the set.- Parameters:
clazz- the JavaClass to add.- Returns:
- true if the class was added.
-
empty
public boolean empty()
Checks if the set is empty.- Returns:
- true if the set is empty.
-
getClassNames
public java.lang.String[] getClassNames()
Gets the class names in the set.- Returns:
- the class names in the set.
-
remove
public void remove(JavaClass clazz)
Removes a JavaClass from the set.- Parameters:
clazz- the JavaClass to remove.
-
toArray
public JavaClass[] toArray()
Converts the set to an array.- Returns:
- an array of JavaClass objects.
-
-