Loop to detect display objects

How can I loop through a displayObject to detect children of a certain class? here is an example of what i would like to do

for each(var item:CustomDisplayItem in ParentDisplayObject){
trace("Hi, I'm a " + item);
}