27
27
import org .springframework .nativex .hint .JdkProxyHint ;
28
28
import org .springframework .nativex .hint .ResourceHint ;
29
29
import org .springframework .nativex .hint .TypeHint ;
30
+ import org .springframework .nativex .type .AccessDescriptor ;
30
31
import org .springframework .nativex .type .HintDeclaration ;
31
32
import org .springframework .nativex .type .NativeConfiguration ;
32
33
import org .springframework .nativex .type .TypeProcessor ;
78
79
types = {
79
80
org .springframework .integration .xml .xpath .XPathUtils .class ,
80
81
org .springframework .integration .json .JsonPathUtils .class ,
81
- com .jayway .jsonpath .JsonPath .class
82
+ com .jayway .jsonpath .JsonPath .class ,
83
+ org .springframework .integration .gateway .MethodArgsHolder .class ,
84
+ org .springframework .integration .routingslip .ExpressionEvaluatingRoutingSlipRouteStrategy .RequestAndReply .class ,
85
+ org .springframework .integration .core .Pausable .class
82
86
})
83
87
},
84
88
jdkProxies = {
@@ -152,15 +156,24 @@ public class IntegrationHints implements NativeConfiguration {
152
156
private static final String MESSAGING_GATEWAY_ANNOTATION =
153
157
"Lorg/springframework/integration/annotation/MessagingGateway;" ;
154
158
159
+ private static final String ABSTRACT_ENDPOINT_TYPE = "Lorg/springframework/integration/endpoint/AbstractEndpoint;" ;
160
+
161
+ private static final String MESSAGE_TYPE = "org/springframework/messaging/Message" ;
162
+
155
163
@ Override
156
164
public List <HintDeclaration > computeHints (TypeSystem typeSystem ) {
157
165
List <HintDeclaration > hints = new ArrayList <>();
158
166
hints .addAll (computeMessagingGatewayHints (typeSystem ));
167
+ hints .addAll (computeAbstractEndpointHints (typeSystem ));
168
+ // hints.addAll(computeMessageHints(typeSystem));
159
169
return hints ;
160
170
}
161
171
162
172
private static List <HintDeclaration > computeMessagingGatewayHints (TypeSystem typeSystem ) {
163
173
return TypeProcessor .namedProcessor ("IntegrationHints - MessagingGateway" )
174
+ .skipMethodInspection ()
175
+ .skipFieldInspection ()
176
+ .skipConstructorInspection ()
164
177
.filter (type ->
165
178
type .hasAnnotationInHierarchy (MESSAGING_GATEWAY_ANNOTATION ) &&
166
179
type .isInterface () &&
@@ -174,4 +187,32 @@ private static List<HintDeclaration> computeMessagingGatewayHints(TypeSystem typ
174
187
.processTypes ();
175
188
}
176
189
190
+ private static List <HintDeclaration > computeAbstractEndpointHints (TypeSystem typeSystem ) {
191
+ return TypeProcessor .namedProcessor ("IntegrationHints - AbstractEndpoint" )
192
+ .skipAnnotationInspection ()
193
+ .skipMethodInspection ()
194
+ .skipFieldInspection ()
195
+ .skipConstructorInspection ()
196
+ .filter (type -> type .extendsClass (ABSTRACT_ENDPOINT_TYPE ))
197
+ .onTypeDiscovered ((type , context ) ->
198
+ context .addReflectiveAccess (type ,
199
+ new AccessDescriptor (AccessBits .CLASS | AccessBits .PUBLIC_METHODS )))
200
+ .use (typeSystem )
201
+ .processTypes ();
202
+ }
203
+
204
+ /* private static List<HintDeclaration> computeMessageHints(TypeSystem typeSystem) {
205
+ return TypeProcessor.namedProcessor("IntegrationHints - Message")
206
+ .skipAnnotationInspection()
207
+ .skipMethodInspection()
208
+ .skipFieldInspection()
209
+ .skipConstructorInspection()
210
+ .filter(type -> type.implementsInterface(MESSAGE_TYPE))
211
+ .onTypeDiscovered((type, context) ->
212
+ context.addReflectiveAccess(type,
213
+ new AccessDescriptor(AccessBits.CLASS | AccessBits.PUBLIC_METHODS)))
214
+ .use(typeSystem)
215
+ .processTypes();
216
+ }*/
217
+
177
218
}
0 commit comments