All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.jy2.commandline.picocli.member.MemberListCommand Maven / Gradle / Ivy

There is a newer version: 0.0.39
Show newest version
package com.github.jy2.commandline.picocli.member;

import java.util.ArrayList;

import com.github.jy2.commandline.picocli.Main;

import picocli.CommandLine.Command;
import picocli.CommandLine.ParentCommand;

@Command(name = "list", description = "List all members by name")
public class MemberListCommand implements Runnable {

	@ParentCommand
	MemberCommand parent;

	public void run() {
		System.out.println("List of members:");
		ArrayList list = Main.introspector.getMemberList();
		for (String m : list) {
//			System.out.println("\t" + m + " created-by: " + m.getStringAttribute("createdby"));
			System.out.println("\t" + m);

			ArrayList list2 = Main.introspector.getMemberNodeList(m);
			list2.sort(String::compareToIgnoreCase);

			for (String s2 : list2) {
				System.out.println("\t\t" + s2);
			}
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy