-
-
Save razum2um/432181a0689e5c447b09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; I'm trying to use https://github.com/cathive/fx-dbus | |
user=> (import [org.freedesktop.dbus Message$MethodArgument Message$StringMethodArgument Message]) | |
org.freedesktop.dbus.Message | |
user=> (def msg (Message/newMethodCall "org.freedesktop.Notifications" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "Notify")) | |
#'user/msg | |
user=> (def app-name (Message$MethodArgument/stringParam "")) | |
#'user/app_name | |
user=> (.addArguments msg app-name) | |
ClassCastException Cannot cast org.freedesktop.dbus.Message$StringMethodArgument to [Lorg.freedesktop.dbus.Message$MethodArgument; java.lang.Class.cast (Class.java:3258) | |
user=> (.addArguments msg (.cast Message$MethodArgument app-name)) | |
ClassCastException Cannot cast org.freedesktop.dbus.Message$StringMethodArgument to [Lorg.freedesktop.dbus.Message$MethodArgument; java.lang.Class.cast (Class.java:3258) | |
user=> (ancestors (class app-name)) | |
#{org.freedesktop.dbus.Message$MethodArgument java.lang.Object} | |
;; classes are defined like this: | |
;; public static final class StringMethodArgument extends MethodArgument<String> | |
;; public static abstract class MethodArgument<T> | |
;; method signature is: | |
;; public void addArguments(final MethodArgument... arguments) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment