HHH-17061 Remove PersistentClass#getSubclassIterator

This commit is contained in:
Sanne Grinovero 2023-08-09 12:10:00 +02:00 committed by Sanne Grinovero
parent f42766e505
commit 4152233395
1 changed files with 0 additions and 18 deletions

View File

@ -260,24 +260,6 @@ public abstract class PersistentClass implements IdentifiableTypeClass, Attribut
return new JoinedList<>( subclassLists );
}
/**
* Iterate over subclasses in a special 'order', most derived subclasses first.
*
* @deprecated use {@link #getSubclasses()}
*/
@Deprecated(since = "6.0") @Remove
public Iterator<Subclass> getSubclassIterator() {
@SuppressWarnings("unchecked")
final Iterator<Subclass>[] iterators = new Iterator[subclasses.size() + 1];
final Iterator<Subclass> iterator = subclasses.iterator();
int i = 0;
while ( iterator.hasNext() ) {
iterators[i++] = iterator.next().getSubclassIterator();
}
iterators[i] = subclasses.iterator();
return new JoinedIterator<>( iterators );
}
public List<PersistentClass> getSubclassClosure() {
final ArrayList<List<PersistentClass>> lists = new ArrayList<>();
lists.add( List.of( this ) );