- java.lang.Object
-
- com.ibm.jvm.dtfjview.commands.helpers.Utils
-
public class Utils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
byteToAscii
static String
byteToEbcdic
static String
CURRENT_MEM_ADDRESS
static String
CURRENT_NUM_BYTES_TO_PRINT
static String
FIND_ATTRIBUTES
static String
REVERSE_SORT_FLAG
static String
RootCommand_OBJECT
static String
SORT_BY_ADDRESS_FLAG
static String
SORT_BY_COUNT_FLAG
static String
SORT_BY_NAME_FLAG
static String
SORT_BY_SIZE_FLAG
static String
VERBOSE_FLAG
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
-
-
-
Field Detail
-
byteToAscii
public static final String byteToAscii
- See Also:
- Constant Field Values
-
byteToEbcdic
public static final String byteToEbcdic
- See Also:
- Constant Field Values
-
CURRENT_MEM_ADDRESS
public static final String CURRENT_MEM_ADDRESS
- See Also:
- Constant Field Values
-
CURRENT_NUM_BYTES_TO_PRINT
public static final String CURRENT_NUM_BYTES_TO_PRINT
- See Also:
- Constant Field Values
-
RootCommand_OBJECT
public static final String RootCommand_OBJECT
- See Also:
- Constant Field Values
-
FIND_ATTRIBUTES
public static final String FIND_ATTRIBUTES
- See Also:
- Constant Field Values
-
SORT_BY_SIZE_FLAG
public static final String SORT_BY_SIZE_FLAG
- See Also:
- Constant Field Values
-
SORT_BY_NAME_FLAG
public static final String SORT_BY_NAME_FLAG
- See Also:
- Constant Field Values
-
SORT_BY_ADDRESS_FLAG
public static final String SORT_BY_ADDRESS_FLAG
- See Also:
- Constant Field Values
-
SORT_BY_COUNT_FLAG
public static final String SORT_BY_COUNT_FLAG
- See Also:
- Constant Field Values
-
REVERSE_SORT_FLAG
public static final String REVERSE_SORT_FLAG
- See Also:
- Constant Field Values
-
VERBOSE_FLAG
public static final String VERBOSE_FLAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
toHex
public static String toHex(ImagePointer p)
Format an ImagePointer for printing. Get the address and format it as a hex string with 0x at the front- Parameters:
p
- the ImagePointer- Returns:
- p.getAddress() as a hex string
-
toHex
public static String toHex(long l)
-
toHex
public static String toHex(int i)
-
toHex
public static String toHex(short s)
-
toHex
public static String toHex(byte b)
-
toFixedWidthHex
public static String toFixedWidthHex(long l)
-
toFixedWidthHex
public static String toFixedWidthHex(int i)
-
toFixedWidthHex
public static String toFixedWidthHex(short s)
-
toFixedWidthHex
public static String toFixedWidthHex(byte b)
-
constructStackFromStringArray
public static Stack<String> constructStackFromStringArray(String[] argsArray)
-
_extractAddressSpace
public static ImageAddressSpace _extractAddressSpace(Image loadedImage)
-
absPath
public static File absPath(Properties properties, String path)
-
getVal
public static String getVal(JavaObject jo, JavaField jf)
-
getPrintable
public static String getPrintable(char c)
-
getPrintableWithQuotes
public static String getPrintableWithQuotes(char c)
-
getFieldModifierString
public static String getFieldModifierString(JavaField jf) throws CorruptDataException
- Throws:
CorruptDataException
-
getMethodModifierString
public static String getMethodModifierString(JavaMethod jm) throws CorruptDataException
- Throws:
CorruptDataException
-
getClassModifierString
public static String getClassModifierString(JavaClass jc) throws CorruptDataException
- Throws:
CorruptDataException
-
isNull
public static boolean isNull(JavaObject jo)
-
getClassGivenName
public static JavaClass[] getClassGivenName(String className, JavaRuntime jr, PrintStream out)
-
getClassGivenAddress
public static JavaClass getClassGivenAddress(long address, JavaRuntime jr)
-
getParkBlockerOwner
public static JavaThread getParkBlockerOwner(JavaObject blocker, JavaRuntime r) throws CorruptDataException, MemoryAccessException
-
getParkBlockerOwnerObject
public static JavaObject getParkBlockerOwnerObject(JavaObject blocker, JavaRuntime r) throws CorruptDataException, MemoryAccessException
-
getThreadNameFromObject
public static String getThreadNameFromObject(JavaObject lockOwnerObj, JavaRuntime rt, PrintStream out) throws CorruptDataException, MemoryAccessException
-
-