use of io.crnk.gen.typescript.model.TSInterfaceType in project crnk-framework by crnk-project.
the class TSWriter method sortAndAppendTypes.
private void sortAndAppendTypes(Set<TSInterfaceType> types) {
List<TSInterfaceType> sorted = new ArrayList<>(types);
Collections.sort(sorted, new Comparator<TSInterfaceType>() {
@Override
public int compare(TSInterfaceType type0, TSInterfaceType type1) {
return type0.getName().compareTo(type1.getName());
}
});
Iterator<TSInterfaceType> iterator = sorted.iterator();
while (iterator.hasNext()) {
TSInterfaceType implementedInterface = iterator.next();
visitReference(implementedInterface);
if (iterator.hasNext()) {
builder.append(", ");
}
}
}
Aggregations