1
1
/*
2
- * Copyright (c) 2023 Oracle and/or its affiliates.
2
+ * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
27
27
import java .net .URLClassLoader ;
28
28
import java .security .CodeSource ;
29
29
import java .security .ProtectionDomain ;
30
- import java .util .Arrays ;
31
30
import java .util .Collection ;
32
31
import java .util .Collections ;
33
32
import java .util .Enumeration ;
@@ -1569,34 +1568,6 @@ private <T> T produce(Supplier<? extends T> supplier,
1569
1568
return this .produce (supplier , disposer , Set .of (type ), qualifiers );
1570
1569
}
1571
1570
1572
- private <T > T produce (Supplier <? extends T > supplier ,
1573
- Consumer <? super T > disposer ,
1574
- Class <T > type ,
1575
- Annotation ... qualifiers ) {
1576
- return this .produce (supplier , disposer , Set .of (type ), Set .copyOf (Arrays .asList (qualifiers )));
1577
- }
1578
-
1579
- private <T > T produce (Supplier <? extends T > supplier ,
1580
- Consumer <? super T > disposer ,
1581
- TypeLiteral <T > type ,
1582
- Set <Annotation > qualifiers ) {
1583
- return this .produce (supplier , disposer , Set .of (type .getType ()), qualifiers );
1584
- }
1585
-
1586
- private <T > T produce (Supplier <? extends T > supplier ,
1587
- Consumer <? super T > disposer ,
1588
- TypeLiteral <T > type ,
1589
- Annotation ... qualifiers ) {
1590
- return this .produce (supplier , disposer , Set .of (type .getType ()), Set .copyOf (Arrays .asList (qualifiers )));
1591
- }
1592
-
1593
- private <T > T produce (Supplier <? extends T > supplier ,
1594
- Consumer <? super T > disposer ,
1595
- Set <Type > types ,
1596
- Annotation ... qualifiers ) {
1597
- return this .produce (supplier , disposer , types , Set .copyOf (Arrays .asList (qualifiers )));
1598
- }
1599
-
1600
1571
private <T > T produce (Supplier <? extends T > supplier ,
1601
1572
Consumer <? super T > disposer ,
1602
1573
Set <Type > types ,
@@ -1617,22 +1588,6 @@ private <T> void dispose(Class<T> type, Set<Annotation> qualifiers) {
1617
1588
this .dispose (Set .of (type ), qualifiers );
1618
1589
}
1619
1590
1620
- private <T > void dispose (Class <T > type , Annotation ... qualifiers ) {
1621
- this .dispose (Set .of (type ), Set .copyOf (Arrays .asList (qualifiers )));
1622
- }
1623
-
1624
- private <T > void dispose (TypeLiteral <T > type , Set <Annotation > qualifiers ) {
1625
- this .dispose (Set .of (type .getType ()), qualifiers );
1626
- }
1627
-
1628
- private <T > void dispose (TypeLiteral <T > type , Annotation ... qualifiers ) {
1629
- this .dispose (Set .of (type .getType ()), Set .copyOf (Arrays .asList (qualifiers )));
1630
- }
1631
-
1632
- private <T > void dispose (Set <Type > types , Annotation ... qualifiers ) {
1633
- this .dispose (types , Set .copyOf (Arrays .asList (qualifiers )));
1634
- }
1635
-
1636
1591
private <T > void dispose (Set <Type > types , Set <Annotation > qualifiers ) {
1637
1592
Map <ReferenceCountingProducer , Map <ProductionId , Production <?>>> tlMap = TL .get ();
1638
1593
Map <ProductionId , Production <?>> map = tlMap .get (this );
0 commit comments