-
-
Save pbalduino/593d9f86ae7811eddc7d 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
;annotation syntax | |
(import [java.lang.annotation Retention RetentionPolicy Target ElementType] | |
[javax.xml.ws WebServiceRef WebServiceRefs]) | |
(definterface Foo (foo [])) | |
;annotation on type | |
(deftype ^{Deprecated true | |
Retention RetentionPolicy/RUNTIME | |
javax.annotation.processing.SupportedOptions ["foo" "bar" "baz"] | |
javax.xml.ws.soap.Addressing {:enabled false :required true} | |
WebServiceRefs [(WebServiceRef {:name "fred" :type String}) | |
(WebServiceRef {:name "ethel" :mappedName "lucy"})]} | |
Bar [^int a | |
;on field | |
^{:tag int | |
Deprecated true | |
Retention RetentionPolicy/RUNTIME | |
javax.annotation.processing.SupportedOptions ["foo" "bar" "baz"] | |
javax.xml.ws.soap.Addressing {:enabled false :required true} | |
WebServiceRefs [(WebServiceRef {:name "fred" :type String}) | |
(WebServiceRef {:name "ethel" :mappedName "lucy"})]} | |
b] | |
;on method | |
Foo (^{Deprecated true | |
Retention RetentionPolicy/RUNTIME | |
javax.annotation.processing.SupportedOptions ["foo" "bar" "baz"] | |
javax.xml.ws.soap.Addressing {:enabled false :required true} | |
WebServiceRefs [(WebServiceRef {:name "fred" :type String}) | |
(WebServiceRef {:name "ethel" :mappedName "lucy"})]} | |
foo [this] 42)) | |
(seq (.getAnnotations Bar)) | |
(seq (.getAnnotations (.getField Bar "b"))) | |
(seq (.getAnnotations (.getMethod Bar "foo" nil))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment