private void rebuildAlternates ( ) { UnionTypeBuilder builder = UnionTypeBuilder . create ( registry ) ; builder . addAlternates ( alternates ) ; alternates = builder . getAlternates ( ) ; }
Use UnionTypeBuilder to rebuild the list of alternates and hashcode of the current UnionType .