public class ClassPool extends Object
| Constructor and Description |
|---|
ClassPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ClassPoolVisitor classPoolVisitor)
Applies the given ClassPoolVisitor to the class pool.
|
void |
addClass(Clazz clazz)
Adds the given Clazz to the class pool.
|
void |
classAccept(String className,
ClassVisitor classVisitor)
Applies the given ClassVisitor to the class with the given name,
if it is present in the class pool.
|
void |
classesAccept(ClassVisitor classVisitor)
Applies the given ClassVisitor to all classes in the class pool,
in random order.
|
void |
classesAcceptAlphabetically(ClassVisitor classVisitor)
Applies the given ClassVisitor to all classes in the class pool,
in sorted order.
|
Iterator |
classNames()
Returns an Iterator of all class names in the class pool.
|
void |
clear()
Clears the class pool.
|
Clazz |
getClass(String className)
Returns a Clazz from the class pool based on its name.
|
void |
removeClass(Clazz clazz)
Removes the given Clazz from the class pool.
|
void |
removeClass(String className)
Removes the specified Clazz from the class pool.
|
int |
size()
Returns the number of classes in the class pool.
|
public void clear()
public void addClass(Clazz clazz)
public void removeClass(Clazz clazz)
public void removeClass(String className)
public Clazz getClass(String className)
null if the class with the given name is not in the class
pool.public Iterator classNames()
public int size()
public void accept(ClassPoolVisitor classPoolVisitor)
public void classesAccept(ClassVisitor classVisitor)
public void classesAcceptAlphabetically(ClassVisitor classVisitor)
public void classAccept(String className, ClassVisitor classVisitor)
Copyright © 2015. All Rights Reserved.