APIdia Launch Partner
Top Fields Constructors Methods
jdk.jfr.internal.tool

pack-priv abstract Class Command

extends Object
Class Inheritance
Known Direct Subclasses
jdk.jfr.internal.tool.Configure, jdk.jfr.internal.tool.Disassemble, jdk.jfr.internal.tool.Help, jdk.jfr.internal.tool.Metadata, jdk.jfr.internal.tool.Print, jdk.jfr.internal.tool.Query, jdk.jfr.internal.tool.Scrub, jdk.jfr.internal.tool.Summary, jdk.jfr.internal.tool.Version, jdk.jfr.internal.tool.View, jdk.jfr.internal.tool.Assemble
Imports
java.io.File, .FileNotFoundException, .IOError, .IOException, .PrintStream, .RandomAccessFile, java.nio.file.Files, .InvalidPathException, .Path, .Paths, java.util.ArrayList, .Collections, .Deque, .List, jdk.jfr.internal.util.UserDataException, .UserSyntaxException, jdk.jfr.internal.JVM

Field Summary

Modifier and TypeField and Description
private static final List<Command>
private static final Command
public static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected boolean
acceptFilterOption(Deque<String> options, String expected)

protected int
acceptInt(Deque<String> options, String text)

protected boolean
acceptOption(Deque<String> options, String expected)

protected boolean
acceptSwitch(Deque<String> options, String expected)

private static String
public static void
checkCommonError(Deque<String> options, String typo, String correct)

protected final void
private static List<Command>
pack-priv static void
protected static void
pack-priv static void
public void
protected void
protected final void
protected final Path
protected final void
ensureFileExtension(Path path, String extension)

protected final void
ensureMaxArgumentCount(Deque<String> options, int maxCount)

protected final void
ensureMinArgumentCount(Deque<String> options, int minCount)

public abstract void
execute(Deque<String> argList)

protected List<String>
public static List<Command>
public abstract String
protected final Path
getDirectory(String pathText)

protected final Path
public abstract String
public List<String>
public List<String>
protected String
protected final boolean
matches(String command)

protected final void
printf(String text, Object... args)

protected final void
protected final void
protected static char
public static Command
valueOf(String commandName)

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMMANDSback to summary
private static final List<Command> COMMANDS
HELPback to summary
private static final Command HELP
titleback to summary
public static final String title

Constructor Detail

Commandback to summary
pack-priv Command()

Method Detail

acceptFilterOptionback to summary
protected boolean acceptFilterOption(Deque<String> options, String expected) throws UserSyntaxException
acceptIntback to summary
protected int acceptInt(Deque<String> options, String text) throws UserSyntaxException
acceptOptionback to summary
protected boolean acceptOption(Deque<String> options, String expected) throws UserSyntaxException
acceptSwitchback to summary
protected boolean acceptSwitch(Deque<String> options, String expected) throws UserSyntaxException
buildAliasback to summary
private static String buildAlias(Command c)
checkCommonErrorback to summary
public static void checkCommonError(Deque<String> options, String typo, String correct) throws UserSyntaxException
couldNotReadErrorback to summary
protected final void couldNotReadError(Path p, IOException e) throws UserDataException
createCommandsback to summary
private static List<Command> createCommands()
displayAvailableCommandsback to summary
pack-priv static void displayAvailableCommands(PrintStream stream)
displayCommandback to summary
protected static void displayCommand(PrintStream stream, Command c)
displayHelpback to summary
pack-priv static void displayHelp()
displayOptionUsageback to summary
public void displayOptionUsage(PrintStream stream)
displayUsageback to summary
protected void displayUsage(PrintStream stream)
ensureAccessback to summary
protected final void ensureAccess(Path path) throws UserDataException
ensureFileDoesNotExistback to summary
protected final Path ensureFileDoesNotExist(Path file) throws UserDataException
ensureFileExtensionback to summary
protected final void ensureFileExtension(Path path, String extension) throws UserDataException
ensureMaxArgumentCountback to summary
protected final void ensureMaxArgumentCount(Deque<String> options, int maxCount) throws UserSyntaxException
ensureMinArgumentCountback to summary
protected final void ensureMinArgumentCount(Deque<String> options, int minCount) throws UserSyntaxException
executeback to summary
public abstract void execute(Deque<String> argList) throws UserSyntaxException, UserDataException
getAliasesback to summary
protected List<String> getAliases()
getCommandsback to summary
public static List<Command> getCommands()
getDescriptionback to summary
public abstract String getDescription()
getDirectoryback to summary
protected final Path getDirectory(String pathText) throws UserDataException
getJFRInputFileback to summary
protected final Path getJFRInputFile(Deque<String> options) throws UserSyntaxException, UserDataException
getNameback to summary
public abstract String getName()
getNamesback to summary
public List<String> getNames()
getOptionSyntaxback to summary
public List<String> getOptionSyntax()
getTitleback to summary
protected String getTitle()
matchesback to summary
protected final boolean matches(String command)
printfback to summary
protected final void printf(String text, Object... args)
printlnback to summary
protected final void println()
printlnback to summary
protected final void println(String text)
quoteCharacterback to summary
protected static char quoteCharacter()
valueOfback to summary
public static Command valueOf(String commandName)
warnForWildcardExpansionback to summary
protected void warnForWildcardExpansion(String option, String filter) throws UserDataException