use of org.whole.lang.pojo.model.Constructors in project whole by wholeplatform.
the class PojoUtils method getConstructors.
public static List<Constructor> getConstructors(PojoDeclaration pojoDeclaration) {
Constructors constructors = pojoDeclaration.getConstructors();
List<Constructor> constructorsList = new ArrayList<Constructor>(constructors.wSize());
IEntityIterator<Constructor> i = IteratorFactory.<Constructor>childIterator();
i.reset(constructors);
for (Constructor constructor : i) constructorsList.add(constructor);
Collections.sort(constructorsList, new Comparator<Constructor>() {
public int compare(Constructor c1, Constructor c2) {
return c1.getParameters().wSize() - c2.getParameters().wSize();
}
});
return constructorsList;
}
Aggregations