public SoyType getOrCreateUnionType ( Collection < SoyType > members ) { SoyType type = UnionType . of ( members ) ; if ( type . getKind ( ) == SoyType . Kind . UNION ) { type = unionTypes . intern ( ( UnionType ) type ) ; } return type ; }
Factory function which creates a union type given the member types . This folds identical union types together .