view src/clojure/test_clojure/genclass/examples.clj @ 10:ef7dbbd6452c

added clojure source goodness
author Robert McIntyre <rlm@mit.edu>
date Sat, 21 Aug 2010 06:25:44 -0400
parents
children
line wrap: on
line source
1 ; Copyright (c) Rich Hickey. All rights reserved.
2 ; The use and distribution terms for this software are covered by the
3 ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 ; which can be found in the file epl-v10.html at the root of this distribution.
5 ; By using this software in any fashion, you are agreeing to be bound by
6 ; the terms of this license.
7 ; You must not remove this notice, or any other, from this software.
9 (ns ^{:doc "Test classes that are AOT-compile for the tests in
10 clojure.test-clojure.genclass."
11 :author "Stuart Halloway, Daniel Solano Gómez"}
12 clojure.test-clojure.genclass.examples)
14 (definterface ExampleInterface
15 (foo [a])
16 (foo [a b])
17 (foo [a #^int b]))
19 (gen-class :name clojure.test_clojure.genclass.examples.ExampleClass
20 :implements [clojure.test_clojure.genclass.examples.ExampleInterface])
22 ;; -foo-Object unimplemented to test missing fn case
24 (defn -foo-Object-Object
25 [_ o1 o2]
26 "foo with o, o")
28 (defn -foo-Object-int
29 [_ o i]
30 "foo with o, i")
32 (gen-class :name ^{Deprecated {}
33 SuppressWarnings ["Warning1"] ; discarded
34 java.lang.annotation.Target []}
35 clojure.test_clojure.genclass.examples.ExampleAnnotationClass
36 :prefix "annot-"
37 :methods [[^{Deprecated {}
38 Override {}} ;discarded
39 foo [^{java.lang.annotation.Retention java.lang.annotation.RetentionPolicy/SOURCE
40 java.lang.annotation.Target [java.lang.annotation.ElementType/TYPE
41 java.lang.annotation.ElementType/PARAMETER]}
42 String] void]])