defrecord
ConstraintLookup
という名前がsre.plan.dsl.constraint
名前空間にあります。 私はsre.plan.compiler
名前空間に置かれgen-class
方法でその生成されたクラスを使用したい:私はAOT nebula-clojure
プラグインとのGradleでコンパイルしていますns:gen-classの別の名前空間のクラスを使用できません
(ns sre.plan.compiler
(:require
[sre.plan.dsl.constraint :as constraint])
(:import (sre.plan.dsl.constraint ConstraintLookup))
(:gen-class
:name sre.plan.Compiler
:methods [^:static [makeConstraintLookupFromTargetsAndBounds
[Iterable Iterable] ConstraintLookup]]))
。私が取得メソッド宣言にsre.plan.dsl.constraint.Constraint
完全修飾を使用した場合も同様に
> Task :sre:compileClojure
Exception in thread "main" java.lang.ClassNotFoundException: java.lang.ConstraintLookup, compiling:(sre/plan/compiler.clj:1:1)
:それはNSの宣言に遭遇した場合、コンパイラはエラーを発する
Exception in thread "main" java.lang.ClassNotFoundException: sre.plan.dsl.constraint.ConstraintLookup, compiling:(sre/plan/compiler.clj:1:1)
ここでの問題は何ですか?迷っています。
UPDATE:
参照nsが次のようになります。
(ns sre.plan.dsl.constraint
(:require [clojure.set :refer :all]
[clojure.algo.generic.functor :refer :all]))
(defrecord ConstraintLookup [free bound])
UPDATE:
GEN-クラスであなたは関係なく、完全修飾クラス名を使用しないために持っていることを私に思えます。しかし、私はまだ完全に修飾された名前でバージョンが動作しない理由を理解できません。
このエラーを再現するためのサンプルプロジェクトを作成できますか。 –