public boolean hasTypeChildren ( TypeRefComponent type ) throws DefinitionException { if ( typeChildren == null || typeOfChildren != type ) { loadTypedChildren ( type ) ; } return ! typeChildren . isEmpty ( ) ; }
if you have a typed element the tree might end at that point . And you may or may not want to walk into the tree of that type It depends what you are doing . So this is a choice . You can ask for the children and then if you get no children you can see if there are children defined for the type and then get them