*/
public static List<SimpleName> toList(Name name) {
if (name == null) {
throw new IllegalArgumentException("name must not be null"); //$NON-NLS-1$
}
ModelKind kind = name.getModelKind();
if (kind == ModelKind.SIMPLE_NAME) {
return Collections.singletonList((SimpleName) name);
} else {
LinkedList<SimpleName> result = new LinkedList<SimpleName>();
Name current = name;