【发布时间】:2016-02-09 03:29:36
【问题描述】:
我看到这些类是在单独的文件夹/包中生成的。但是接口文件是在根目录下生成的,而不是在具体包里面生成的。
这是 JVM Inferrer 的代码:
def dispatch void infer(Repository repo,
IJvmDeclaredTypeAcceptor acceptor,
boolean isPrelinkingPhase) {
acceptor.accept(repo.toInterface(repo.name, [])) [
documentation = repo.documentation
annotations += annotationRef(REPOSITORY);
superTypes += JPAREPOSITORY.typeRef(repo.type.cloneWithProxies,Long.typeRef);
]
}
这是模型:
import dsltest.models.Plant
import dsltest.models.Customer
package dsltest.repositories {
repo PlantRepository : Plant {}
repo CustomerRepository : Customer {}
}
这是生成的文件:
如何在 dsltest-> respositories -> CustomerRepository.java 中生成接口
【问题讨论】: