APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.tools.jconsole.inspector

public Class Utils

extends Object
Class Inheritance
Imports
java.awt.event.*, java.lang.reflect.*, java.math.BigDecimal, .BigInteger, java.util.*, java.util.concurrent.ExecutionException, javax.management.*, javax.management.openmbean.*, javax.swing.*, javax.swing.text.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private static final Set<String>
private static final Set<String>
private static final Set<Class<?>>
private static final Set<String>
private static final Set<String>
private static final Map<String, Class<?>>
private static final Set<Class<?>>
private static final Map<String, Class<?>>
private static final Set<Class<?>>
private static Set<Integer>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean
canBeRenderedAsArray(Object elem)

Check if the given element denotes a supported array-friendly data structure, i.e. a data structure jconsole can render as an array.

private static Number
createNumberFromStringValue(String value)

Try to convert a string value into a numerical value.

public static Object
createObjectFromString(String type, String value)

This method attempts to create an object of the given "type" using the "value" parameter.

public static Throwable
getActualException(Throwable e)

If the exception is wrapped, unwrap it.

public static String
getArrayClassName(String name)

This method provides a readable classname if it's an array, i.e. either the classname of the component type for arrays of java reference types or the name of the primitive type for arrays of java primitive types.

public static Class<?>
getClass(String className)

This method returns the class matching the name className.

public static String
getDefaultValue(String type)

This method inserts a default value for the standard java types, else it inserts the text name of the expected class type.

public static Object[]
getParameters(XTextField[] inputs, String[] params)

This method is responsible for converting the inputs given by the user into a useful object array for passing into a parameter array.

public static String
getReadableClassName(String name)

This methods provides a readable classname.

public static boolean
isEditableType(String type)

This method tells whether the type is editable (means can be created with a String or not)

public static boolean
isSupportedArray(Object elem)

Check if the given element is an array.

public static boolean
isUniformCollection(Collection<?> c, Class<?> e)

Check if the given collection is a uniform collection of the given type.

public static Object
newStringConstructor(String type, String param)

Try to create a Java object using a one-string-param constructor.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

booleanTypesback to summary
private static final Set<String> booleanTypes
editableTypesback to summary
private static final Set<String> editableTypes
extraEditableClassesback to summary
private static final Set<Class<?>> extraEditableClasses
extraNumericalTypesback to summary
private static final Set<String> extraNumericalTypes
numericalTypesback to summary
private static final Set<String> numericalTypes
primitiveMapback to summary
private static final Map<String, Class<?>> primitiveMap
primitivesback to summary
private static final Set<Class<?>> primitives
primitiveToWrapperback to summary
private static final Map<String, Class<?>> primitiveToWrapper
primitiveWrappersback to summary
private static final Set<Class<?>> primitiveWrappers
tableNavigationKeysback to summary
private static Set<Integer> tableNavigationKeys

Constructor Detail

Utilsback to summary
private Utils()

Method Detail

canBeRenderedAsArrayback to summary
public static boolean canBeRenderedAsArray(Object elem)

Check if the given element denotes a supported array-friendly data structure, i.e. a data structure jconsole can render as an array.

createNumberFromStringValueback to summary
private static Number createNumberFromStringValue(String value) throws NumberFormatException

Try to convert a string value into a numerical value.

createObjectFromStringback to summary
public static Object createObjectFromString(String type, String value) throws Exception

This method attempts to create an object of the given "type" using the "value" parameter. e.g. calling createObjectFromString("java.lang.Integer", "10") will return an Integer object initialized to 10.

getActualExceptionback to summary
public static Throwable getActualException(Throwable e)

If the exception is wrapped, unwrap it.

getArrayClassNameback to summary
public static String getArrayClassName(String name)

This method provides a readable classname if it's an array, i.e. either the classname of the component type for arrays of java reference types or the name of the primitive type for arrays of java primitive types. Otherwise, it returns null.

getClassback to summary
public static Class<?> getClass(String className) throws ClassNotFoundException

This method returns the class matching the name className. It's used to cater for the primitive types.

getDefaultValueback to summary
public static String getDefaultValue(String type)

This method inserts a default value for the standard java types, else it inserts the text name of the expected class type. It acts to give a clue as to the input type.

getParametersback to summary
public static Object[] getParameters(XTextField[] inputs, String[] params) throws Exception

This method is responsible for converting the inputs given by the user into a useful object array for passing into a parameter array.

getReadableClassNameback to summary
public static String getReadableClassName(String name)

This methods provides a readable classname. If the supplied name parameter denotes an array this method returns either the classname of the component type for arrays of java reference types or the name of the primitive type for arrays of java primitive types followed by n-times "[]" where 'n' denotes the arity of the array. Otherwise, if the supplied name doesn't denote an array it returns the same classname.

isEditableTypeback to summary
public static boolean isEditableType(String type)

This method tells whether the type is editable (means can be created with a String or not)

isSupportedArrayback to summary
public static boolean isSupportedArray(Object elem)

Check if the given element is an array. Multidimensional arrays are not supported. Non-empty 1-dimensional arrays of CompositeData and TabularData are not handled as arrays but as tabular data.

isUniformCollectionback to summary
public static boolean isUniformCollection(Collection<?> c, Class<?> e)

Check if the given collection is a uniform collection of the given type.

newStringConstructorback to summary
public static Object newStringConstructor(String type, String param) throws Exception

Try to create a Java object using a one-string-param constructor.

sun.tools.jconsole.inspector back to summary

public Class Utils.CopyKeyAdapter

extends KeyAdapter
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
keyPressed(KeyEvent e)

Overrides java.awt.event.KeyAdapter.keyPressed.

Implements java.awt.event.KeyListener.keyPressed.

Invoked when a key has been pressed.

public void
keyTyped(KeyEvent e)

Overrides java.awt.event.KeyAdapter.keyTyped.

Implements java.awt.event.KeyListener.keyTyped.

Invoked when a key has been typed.

Inherited from java.awt.event.KeyAdapter:
keyReleased

Field Detail

defaultEditorKitCopyActionNameback to summary
private static final String defaultEditorKitCopyActionName
transferHandlerCopyActionNameback to summary
private static final String transferHandlerCopyActionName

Constructor Detail

CopyKeyAdapterback to summary
public CopyKeyAdapter()

Method Detail

keyPressedback to summary
public void keyPressed(KeyEvent e)

Overrides java.awt.event.KeyAdapter.keyPressed.

Implements java.awt.event.KeyListener.keyPressed.

Doc from java.awt.event.KeyAdapter.keyPressed.

Invoked when a key has been pressed.

Annotations
@Override
keyTypedback to summary
public void keyTyped(KeyEvent e)

Overrides java.awt.event.KeyAdapter.keyTyped.

Implements java.awt.event.KeyListener.keyTyped.

Doc from java.awt.event.KeyAdapter.keyTyped.

Invoked when a key has been typed. This event occurs when a key press is followed by a key release.

Annotations
@Override
sun.tools.jconsole.inspector back to summary

public Class Utils.EditFocusAdapter

extends FocusAdapter
Class Inheritance

Field Summary

Modifier and TypeField and Description
private CellEditor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
focusLost(FocusEvent e)

Overrides java.awt.event.FocusAdapter.focusLost.

Implements java.awt.event.FocusListener.focusLost.

Invoked when a component loses the keyboard focus.

Inherited from java.awt.event.FocusAdapter:
focusGained

Field Detail

editorback to summary
private CellEditor editor

Constructor Detail

EditFocusAdapterback to summary
public EditFocusAdapter(CellEditor editor)

Method Detail

focusLostback to summary
public void focusLost(FocusEvent e)

Overrides java.awt.event.FocusAdapter.focusLost.

Implements java.awt.event.FocusListener.focusLost.

Doc from java.awt.event.FocusAdapter.focusLost.

Invoked when a component loses the keyboard focus.

Annotations
@Override
sun.tools.jconsole.inspector back to summary

public Class Utils.ReadOnlyTableCellEditor

extends DefaultCellEditor
Class Inheritance
Known Direct Subclasses
sun.tools.jconsole.inspector.XMBeanInfo.MBeanInfoTableCellEditor
Annotations
@SuppressWarnings:serial

Field Summary

Inherited from javax.swing.DefaultCellEditor:
clickCountToStartdelegateeditorComponent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from javax.swing.DefaultCellEditor:
cancelCellEditinggetCellEditorValuegetClickCountToStartgetComponentgetTableCellEditorComponentgetTreeCellEditorComponentisCellEditablesetClickCountToStartshouldSelectCellstopCellEditing

Constructor Detail

ReadOnlyTableCellEditorback to summary
public ReadOnlyTableCellEditor(JTextField tf)