File tree Expand file tree Collapse file tree
commons-core/src/main/java/fr/inria/atlanmod/commons/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ private class OSGiServiceDefinition<S> implements ServiceDefinition<S> {
9393 * The service reference.
9494 */
9595 @ Nonnull
96- private final ServiceReference <S > serviceReference ;
96+ private final ServiceReference <S > reference ;
9797
9898 /**
9999 * The on-demand service.
@@ -104,18 +104,26 @@ private class OSGiServiceDefinition<S> implements ServiceDefinition<S> {
104104 /**
105105 * Constructs a new {@code OSGiServiceDefinition}.
106106 *
107- * @param serviceReference the service reference
107+ * @param reference the service reference
108108 */
109- public OSGiServiceDefinition (ServiceReference <S > serviceReference ) {
110- this .serviceReference = serviceReference ;
111- this .service = Lazy .with (() -> context .getService (this .serviceReference ));
109+ public OSGiServiceDefinition (ServiceReference <S > reference ) {
110+ this .reference = reference ;
111+ this .service = Lazy .with (() -> context .getService (this .reference ));
112112 }
113113
114114 @ Nonnull
115115 @ Override
116116 @ SuppressWarnings ("unchecked" )
117117 public Class <? extends S > type () {
118118 return (Class <? extends S >) get ().getClass ();
119+
120+ // try {
121+ // final String className = String[].class.cast(reference.getProperty("objectClass"))[0];
122+ // return (Class<? extends S>) reference.getBundle().loadClass(className);
123+ // }
124+ // catch (ClassNotFoundException e) {
125+ // throw Throwables.shouldNeverHappen(e);
126+ // }
119127 }
120128
121129 @ Nonnull
You can’t perform that action at this time.
0 commit comments