java - How to generate generate static methods with clojure's Gen-class? -


In my close-code I would like to generate a class file that has a fixed method (named staticMethod ), which is then said in a static context from a Java program.

I have tried (close):

  (ns com.stackoverflow .clojure.testGenClass (: gen-class: name com.stackoverflow.clojure.TestGenClass: prefix "Java-": methods [[^ ^ {: stable true] static mode [string string] string]]) (def: Private pre "start:") (defn # ^ {static true} Java-static mode [ Text post] (string pre-text post))  

and (Java):

  package com.stackoverflow.clojure; Public Class TestGenClassTest {Personal TestGenClassTest () {} Public Static Zero Main (string [] Args) {TestGenClass.staticMethod ("Stable call from Java!", ": END"); }}  

I read:

adding metadata - # ^ {via: static true} - You can also specify static methods Can define.

There is no place where I put the code # ^ {static true} , always the Java compiler says:

Can not test a static method for the static method (string, string) of non-static method from test type,

How do I define a static method in the closure? What does # ^ {static true} and ^: static mean the same? Where is this document?

when Kotta announcement they "disobedience" to the whole vector holding the declaration:

 : methods [^: static [static method [string string] string]]  

Unfortunately Closer This type of terminology is similar to documentation.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -