Suppose I have two classes, each of them provides Builder
API.
// This is in Ivy Script
import example.Person.Builder;
Builder errorPersonBuilder = new Person.Builder(); // this line generates a compilation error saying class Person.Builder not found.
Builder workingPersonBuilder = new Builder(); // this works.
It is still OK if there is only one Builder
inside the context. As soon as there is another:
// This is in Ivy Script
import example.Person.Builder;
import example.Company.Builder; // compilation error of collision, there are two classes named Builder.
Builder workingPersonBuilder = new Builder(); // this works, see above.
Builder anotherBuilder = new Builder(); // which builder?
If Ivy Script could supports the same as normal Java, we could do:
import example.Person.Builder;
import example.Company.Builder;
Person.Builder personBuilder = new Person.Builder();
Company.Builder companyBuilder = new Company.Builder();
Should this be supported in Ivy Script?
asked
29.04.2016 at 07:13
Genzer Hawker
(suspended)
accept rate:
66%