APIdia Launch Partner
Top Fields Constructors Methods
sun.jvm.hotspot

public Class SALauncher

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .ArrayList, .HashMap, .List, .Map, java.util.function.Consumer, sun.jvm.hotspot.debugger.DebuggerException, sun.jvm.hotspot.tools.JStack, .JMap, .JInfo, .JSnap

Field Summary

Modifier and TypeField and Description
private static final String
private static Map<String, Consumer<String[]>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static String[]
buildAttachArgs(Map<String, String> newArgMap, boolean allowEmpty)

private static boolean
private static boolean
commonHelp(String mode, boolean canConnectToRemote)

private static boolean
private static boolean
private static boolean
private static boolean
private static boolean
private static boolean
private static boolean
public static void
main(String[] args)

private static Map<String, String>
parseOptions(String[] oldArgs, Map<String, String> longOptsMap)

This method converts jhsdb-style options (oldArgs) to old fashioned style.

private static void
runCLHSDB(String[] oldArgs)

private static void
runDEBUGD(String[] args)

private static void
runHSDB(String[] oldArgs)

private static void
runJINFO(String[] oldArgs)

private static void
runJMAP(String[] oldArgs)

private static void
runJSNAP(String[] oldArgs)

private static void
runJSTACK(String[] oldArgs)

private static boolean
toolHelp(String toolName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NO_REMOTEback to summary
private static final String NO_REMOTE
toolMapback to summary
private static Map<String, Consumer<String[]>> toolMap

Constructor Detail

SALauncherback to summary
public SALauncher()

Method Detail

buildAttachArgsback to summary
private static String[] buildAttachArgs(Map<String, String> newArgMap, boolean allowEmpty)
commonHelpback to summary
private static boolean commonHelp(String mode)
commonHelpback to summary
private static boolean commonHelp(String mode, boolean canConnectToRemote)
commonHelpWithConnectback to summary
private static boolean commonHelpWithConnect(String mode)
debugdHelpback to summary
private static boolean debugdHelp()
jinfoHelpback to summary
private static boolean jinfoHelp()
jmapHelpback to summary
private static boolean jmapHelp()
jsnapHelpback to summary
private static boolean jsnapHelp()
jstackHelpback to summary
private static boolean jstackHelp()
launcherHelpback to summary
private static boolean launcherHelp()
mainback to summary
public static void main(String[] args)
parseOptionsback to summary
private static Map<String, String> parseOptions(String[] oldArgs, Map<String, String> longOptsMap)

This method converts jhsdb-style options (oldArgs) to old fashioned style. SALauncher delegates the work to the entry point of each tool. Thus we need to convert the arguments. For example, `jhsdb jstack --mixed` needs to be converted to `jstack -m`. longOptsMap holds the rule how this method should convert the args. The key is the name of jhsdb style, the value is the name of old fashioned style. If you want to convert mixed option in jstack, you need to set "mixed" to the key, and to set "-m" to the value in longOptsMap. If the option have the value, you need to add "=" to the key like "exe=". You also can set the options which cannot be mapped to old fashioned arguments. For example, `jhsdb jmap --binaryheap` cannot be mapped to `jmap` option directly. But you set it to longOptsMap, then you can know the user sets "binaryheap" option, and SALauncher should set "-heap:format:b" to jmap option. This method returns the map of the old fashioned key/val pairs. It can be used to build args in string array at buildAttachArgs().

runCLHSDBback to summary
private static void runCLHSDB(String[] oldArgs)
runDEBUGDback to summary
private static void runDEBUGD(String[] args)
Annotations
@SuppressWarnings:removal
runHSDBback to summary
private static void runHSDB(String[] oldArgs)
runJINFOback to summary
private static void runJINFO(String[] oldArgs)
runJMAPback to summary
private static void runJMAP(String[] oldArgs)
runJSNAPback to summary
private static void runJSNAP(String[] oldArgs)
runJSTACKback to summary
private static void runJSTACK(String[] oldArgs)
toolHelpback to summary
private static boolean toolHelp(String toolName)