File tree Expand file tree Collapse file tree 3 files changed +2
-42
lines changed
main/java/org/springframework/aot/hint
test/java/org/springframework/aot/hint Expand file tree Collapse file tree 3 files changed +2
-42
lines changed Original file line number Diff line number Diff line change 29
29
*
30
30
* @author Stephane Nicoll
31
31
* @author Brian Clozel
32
- * @author Sam Brannen
33
32
* @since 6.0
34
33
*/
35
34
public final class JdkProxyHint implements ConditionalHint {
@@ -131,17 +130,6 @@ public Builder proxiedInterfaces(Class<?>... proxiedInterfaces) {
131
130
return this ;
132
131
}
133
132
134
- /**
135
- * Add the specified interfaces that the proxy should implement.
136
- * @param proxiedInterfaces the fully qualified class names of interfaces
137
- * the proxy should implement
138
- * @return {@code this}, to facilitate method chaining
139
- */
140
- public Builder proxiedInterfaces (String ... proxiedInterfaces ) {
141
- this .proxiedInterfaces .addAll (toTypeReferences (proxiedInterfaces ));
142
- return this ;
143
- }
144
-
145
133
/**
146
134
* Make this hint conditional on the fact that the specified type
147
135
* can be resolved.
@@ -171,10 +159,6 @@ private static List<TypeReference> toTypeReferences(Class<?>... proxiedInterface
171
159
return Arrays .stream (proxiedInterfaces ).map (TypeReference ::of ).toList ();
172
160
}
173
161
174
- private static List <TypeReference > toTypeReferences (String ... proxiedInterfaces ) {
175
- return Arrays .stream (proxiedInterfaces ).map (TypeReference ::of ).toList ();
176
- }
177
-
178
162
}
179
163
180
164
}
Original file line number Diff line number Diff line change 27
27
* Gather the need for using proxies at runtime.
28
28
*
29
29
* @author Stephane Nicoll
30
- * @author Sam Brannen
31
30
* @since 6.0
32
31
*/
33
32
public class ProxyHints {
@@ -91,21 +90,6 @@ public ProxyHints registerJdkProxy(Class<?>... proxiedInterfaces) {
91
90
jdkProxyHint .proxiedInterfaces (proxiedInterfaces ));
92
91
}
93
92
94
- /**
95
- * Register that a JDK proxy implementing the specified interfaces is
96
- * required.
97
- * <p>When registering a JDK proxy for Spring AOP, consider using
98
- * {@link org.springframework.aop.framework.AopProxyUtils#completeJdkProxyInterfaces(String...)
99
- * AopProxyUtils.completeJdkProxyInterfaces()} for convenience.
100
- * @param proxiedInterfaces the fully qualified class names of interfaces the
101
- * proxy should implement
102
- * @return {@code this}, to facilitate method chaining
103
- */
104
- public ProxyHints registerJdkProxy (String ... proxiedInterfaces ) {
105
- return registerJdkProxy (jdkProxyHint ->
106
- jdkProxyHint .proxiedInterfaces (proxiedInterfaces ));
107
- }
108
-
109
93
/**
110
94
* Register that a class proxy is required for the class defined by the
111
95
* specified {@link TypeReference}.
Original file line number Diff line number Diff line change 32
32
* Tests for {@link ProxyHints}.
33
33
*
34
34
* @author Stephane Nicoll
35
- * @author Sam Brannen
36
35
*/
37
36
class ProxyHintsTests {
38
37
@@ -53,17 +52,10 @@ void registerJdkProxyWithConcreteClass() {
53
52
54
53
@ Test
55
54
void registerJdkProxyWithInterfaceClassNames () {
56
- this .proxyHints .registerJdkProxy (Function .class .getName (), "com.example.Advised" );
57
- assertThat (this .proxyHints .jdkProxies ()).singleElement ()
58
- .satisfies (proxiedInterfaces (Function .class .getName (), "com.example.Advised" ));
59
- }
60
-
61
- @ Test
62
- void registerJdkProxyWithTypeReferences () {
63
55
this .proxyHints .registerJdkProxy (TypeReference .of (Function .class ),
64
56
TypeReference .of ("com.example.Advised" ));
65
- assertThat (this .proxyHints .jdkProxies ()).singleElement ()
66
- . satisfies ( proxiedInterfaces ( Function .class .getName (), "com.example.Advised" ));
57
+ assertThat (this .proxyHints .jdkProxies ()).singleElement (). satisfies ( proxiedInterfaces (
58
+ Function .class .getName (), "com.example.Advised" ));
67
59
}
68
60
69
61
@ Test
You can’t perform that action at this time.
0 commit comments