public ConstructorSelectionImpl(Class javaType, Selection[] subSelections) {
super(javaType, subSelections, true);//need to validate selection items
}
public ConstructorReportItem translate(){
ConstructorReportItem item = new ConstructorReportItem(this.getAlias());
item.setResultType(this.getJavaType());
item.setConstructor(constructor);
for(Selection selection : this.getCompoundSelectionItems()){
if (((SelectionImpl)selection).isCompoundSelection()){
item.addItem(((ConstructorSelectionImpl)selection).translate());
}else{
ReportItem reportItem = new ReportItem(item.getName()+item.getReportItems().size(),
((SelectionImpl)selection).getCurrentNode());
//bug: 297385 - set type here because the selection already knows the type
reportItem.setResultType(selection.getJavaType());
item.addItem(reportItem);
}
}
return item;
}