From 24ad39eec2a0fdca1ef9768de0b92e45a34c1a24 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Tue, 03 Dec 2024 13:35:37 +0000
Subject: [PATCH] Anwendungsspezifische Parameter im Scanner auf generisches Object-Array umgestellt
---
src/de/uhilger/neon/Factory.java | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/de/uhilger/neon/Factory.java b/src/de/uhilger/neon/Factory.java
index ddbb717..3748d5b 100644
--- a/src/de/uhilger/neon/Factory.java
+++ b/src/de/uhilger/neon/Factory.java
@@ -397,7 +397,20 @@
/* -------------- ScannerListener Implementierung --------------- */
@Override
- public void annotationFound(Class foundClass, Handler h, String contextName) {
- wire(h, foundClass, contextName);
+ public void annotationFound(Class foundClass, Object[] params) {
+ Handler h = null;
+ String contextName = null;
+ for(Object param : params) {
+ if(param instanceof Handler) {
+ h = (Handler) param;
+ } else if(param instanceof String) {
+ contextName = (String) param;
+ }
+ }
+ if(h == null || contextName == null) {
+ Logger.getLogger(Factory.class.getName()).log(Level.FINER, "Handler oder contextName ist null");
+ } else {
+ wire(h, foundClass, contextName);
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3