Reputation: 3
I have strange error in my code:
import dsltest.models.Plant
import dsltest.controllers.PlantController.create
package dsltest.assemblers {
assembler PlantAssembler : Plant {
state CREATES
create => PENDING
end
state PENDING
end
}
}
Error: "dsltest.controllers.PlantController.create cannot be resolved to a type." occurs at import(second line). There is no error at first line import.
"create" is a method encapsulated by controller-"PlantController"
I tried to clean project, but it didn't help. Please someone help me to solve this.
Upvotes: 0
Views: 889
Reputation: 365
You should use a static import declaration to import static members:
import static dsltest.controllers.PlantController.create
Otherwise dsltest.controllers.PlantController.create
is treated as a reference to JvmDeclaredType
.
Upvotes: 2