String annotationType = classSpecification.annotationType;
if (annotationType != null)
{
composedClassVisitor =
new AllAttributeVisitor(
new AllAnnotationVisitor(
new AnnotationTypeFilter(annotationType,
new AnnotatedClassVisitor(composedClassVisitor))));
}
// If specified, only visit classes with the right access flags.
if (classSpecification.requiredSetAccessFlags != 0 ||
classSpecification.requiredUnsetAccessFlags != 0)
{
composedClassVisitor =
new ClassAccessFilter(classSpecification.requiredSetAccessFlags,
classSpecification.requiredUnsetAccessFlags,
composedClassVisitor);
}
// If it's specified, start visiting from the extended class.
if (extendsAnnotationType != null ||
extendsClassName != null)
{
// Start visiting from the extended class.
composedClassVisitor =
new ClassHierarchyTraveler(false, false, false, true,
composedClassVisitor);
// If specified, only visit extended classes with the right annotation.
if (extendsAnnotationType != null)
{
composedClassVisitor =
new AllAttributeVisitor(
new AllAnnotationVisitor(
new AnnotationTypeFilter(extendsAnnotationType,
new AnnotatedClassVisitor(composedClassVisitor))));
}