use of com.google.security.zynamics.binnavi.disassembly.INaviAddressSpace in project binnavi by google.
the class CNameListGenerators method getNameList.
/**
* Generates a name list from the names of the given address spaces.
*
* @param addressSpaces The address spaces that provide the names.
*
* @return The generated name list.
*/
public static String getNameList(final INaviAddressSpace[] addressSpaces) {
int count = 0;
final StringBuilder list = new StringBuilder();
for (final INaviAddressSpace addressSpace : addressSpaces) {
list.append("- ");
list.append(addressSpace.getConfiguration().getName());
list.append('\n');
count++;
if ((count == MAX_LIST_LENGTH) && (addressSpaces.length != MAX_LIST_LENGTH)) {
list.append("\n... ");
list.append(String.format("%d others ...", addressSpaces.length - count));
break;
}
}
return list.toString();
}
Aggregations