|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseAdapter
org.pfsw.joi.Inspector
public abstract class Inspector
This is the default inspector, which can display all normal java objects.
Currently it opens a window on the object to inspect and displays all
of its fields that are not static and not final,
which means no class variables and no constants, but all instance variables
(including inherited attributes).
For arrays it lists up all elements from 0 to n.
For deeper inspection it is possible to open a new inspector on each
attribute.
Here is an example how to use the inspector:
panel = new JPanel() ;
Inspector.inspect( panel ) ;
Field Summary | |
---|---|
protected static java.lang.String |
ActionSeparator
|
static java.lang.String |
EXPORTER_MAPPING_FILENAME
The filename that will be looked up in each classpath element to load exporter classes ( implementors of ExportProvider ) automatically into the registry of JOI. |
static java.lang.String |
EXPORTER_MAPPING_FILENAME_ALL
|
static java.lang.String |
EXPORTER_MAPPING_FILENAME_CLASSLOADER
|
protected static java.lang.String |
ExportPrefix
|
protected static java.lang.String |
ImportPrefix
|
static java.lang.String |
INSPECTOR_MAPPING_FILENAME
The filename that will be looked up in each classpath element to load inspector classes ( subclasses of BasicInspector ) automatically into the registry of JOI. |
static java.lang.String |
INSPECTOR_MAPPING_FILENAME_ALL
|
static java.lang.String |
INSPECTOR_MAPPING_FILENAME_CLASSLOADER
|
protected static java.lang.String |
PROG_COPYRIGHT
|
protected static java.lang.String |
PROG_FULL_SIGNATURE
|
protected static java.lang.String |
PROG_ID
|
protected static java.lang.String |
PROG_NAME
|
protected static java.lang.String |
PROG_SIGNATURE
|
protected static java.lang.String |
PROG_VERSION
|
Constructor Summary | |
---|---|
protected |
Inspector()
Initialize the new instance with default values. |
Method Summary | |
---|---|
protected static boolean |
anyInspectorActive()
Returns whether at least one inspector is currently running. |
protected static void |
basicBindInspector(java.lang.String className,
java.lang.String inspectorName)
|
static Inspector |
basicInspect(java.lang.Object obj)
Inspect the given object. |
static Inspector |
basicInspect(java.lang.String name,
java.lang.Object obj)
Inspect the given object. |
protected static BasicInspector |
basicInspectIn(InspectionWindowController controller,
int where,
java.lang.String name,
java.lang.Object obj)
Opens a new basic inspector with the given controller. |
static void |
basicInspectWait(java.lang.Object obj)
Inspect the given object like in basicInspect(). |
static void |
basicInspectWait(java.lang.String name,
java.lang.Object obj)
Inspect the given object like in basicInspect(). |
static void |
bindInspector(java.lang.String className,
java.lang.String inspectorName)
Bind a specific class or interface to a special inspector class. |
protected static void |
closeAllControllers()
|
static void |
deactivateHalt()
Continues the current process. |
protected static org.pfsw.joi.ClassAssociations |
exportProviderRegistry()
|
protected static ExportProvider |
findExporterNamed(java.lang.String exporterId)
|
protected static org.pfsw.reflect.ClassInfo |
findInspectorClassInfoFor(java.lang.Object object)
|
static java.lang.String |
fullIdentification()
Returns the component's long name and current version |
protected static java.lang.String |
getAboutInfoText()
Returns the JOI about information. |
static AbstractObjectSpy |
getBasicObjectSpy(java.lang.Object obj)
Returns the object spy wrapper for the given object. |
static AbstractObjectSpy |
getBasicObjectSpy(java.lang.String name,
java.lang.Object obj)
Returns the object spy wrapper for the given object. |
protected static java.util.List |
getControllerRegistry()
|
protected static org.pfsw.joi.ClassAssociations |
getExportProviderRegistry()
|
protected static boolean |
getHaltCurrentProccess()
|
protected AbstractObjectSpy |
getInspectedObject()
|
protected static org.pfsw.joi.ClassAssociations |
getInspectorBinding()
|
protected static BasicInspector |
getInspectorFor(java.lang.Object obj)
|
static AbstractObjectSpy |
getObjectSpy(java.lang.Object obj)
Returns the object spy wrapper for the given object. |
static AbstractObjectSpy |
getObjectSpy(java.lang.String name,
java.lang.Object obj)
Returns the object spy wrapper for the given object. |
static java.lang.String |
getProgSignature()
Returns the name and current version of this component. |
static void |
halt()
Halts the current process. |
protected static void |
initializeExportProviderRegistry()
|
protected static void |
initializeInspectorBinding()
|
static Inspector |
inspect(java.lang.Object obj)
Inspect the given object. |
static Inspector |
inspect(java.lang.String name,
java.lang.Object obj)
Inspect the given object. |
protected static BasicInspector |
inspectIn(InspectionWindowController controller,
int where,
java.lang.String name,
java.lang.Object obj)
Opens a new inspector controlled by the given controller. |
protected void |
inspectObject(java.lang.String name,
java.lang.Object obj)
Inspect the given object. |
protected static org.pfsw.joi.ClassAssociations |
inspectorBinding()
|
static void |
inspectWait(java.lang.Object obj)
Inspect the given object like in inspect(). |
static void |
inspectWait(java.lang.String name,
java.lang.Object obj)
Inspect the given object like in inspect(). |
protected static boolean |
isHaltActive()
Returns whether or not the current process halt is still active |
protected static Inspector |
launchInspectorOn(BasicInspector inspector,
java.lang.String name,
java.lang.Object obj)
Starts the given inspector. |
static void |
main(java.lang.String[] args)
|
protected AbstractObjectSpy |
objectSpyFor(java.lang.Object obj)
Returns the correct wrapper class (spy) for the given object. |
protected AbstractObjectSpy |
objectSpyFor(java.lang.String name,
java.lang.Object obj)
Returns the correct wrapper class (spy) for the given object. |
protected static BasicInspector |
openInspectorIn(InspectionWindowController controller,
int where,
BasicInspector inspector,
java.lang.String name,
java.lang.Object obj)
Opens a new inspector with the given controller. |
protected static void |
registerController(InspectionWindowController controller)
Registers the given controller. |
protected static void |
setControllerRegistry(java.util.List newValue)
|
protected static void |
setExportProviderRegistry(org.pfsw.joi.ClassAssociations newValue)
|
protected static void |
setHaltCurrentProccess(boolean newValue)
|
protected void |
setInspectedObject(AbstractObjectSpy newValue)
|
protected static void |
setInspectorBinding(org.pfsw.joi.ClassAssociations newValue)
|
static java.lang.String |
shortIdentification()
Returns the component's short name and current version |
protected static void |
unregisterController(InspectionWindowController controller)
Unregisters the given controller. |
protected static void |
waitWhileHaltActive()
Runs an endless loop until the last inspector is closed or the current should explicitly be continued. |
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String PROG_NAME
protected static final java.lang.String PROG_ID
protected static final java.lang.String PROG_VERSION
protected static final java.lang.String PROG_COPYRIGHT
protected static final java.lang.String PROG_SIGNATURE
protected static final java.lang.String PROG_FULL_SIGNATURE
protected static final java.lang.String ActionSeparator
protected static final java.lang.String ExportPrefix
protected static final java.lang.String ImportPrefix
public static final java.lang.String INSPECTOR_MAPPING_FILENAME
public static final java.lang.String INSPECTOR_MAPPING_FILENAME_CLASSLOADER
public static final java.lang.String INSPECTOR_MAPPING_FILENAME_ALL
public static final java.lang.String EXPORTER_MAPPING_FILENAME
public static final java.lang.String EXPORTER_MAPPING_FILENAME_CLASSLOADER
public static final java.lang.String EXPORTER_MAPPING_FILENAME_ALL
Constructor Detail |
---|
protected Inspector()
Method Detail |
---|
protected static java.util.List getControllerRegistry()
protected static void setControllerRegistry(java.util.List newValue)
protected static org.pfsw.joi.ClassAssociations getInspectorBinding()
protected static void setInspectorBinding(org.pfsw.joi.ClassAssociations newValue)
protected static org.pfsw.joi.ClassAssociations getExportProviderRegistry()
protected static void setExportProviderRegistry(org.pfsw.joi.ClassAssociations newValue)
protected static boolean getHaltCurrentProccess()
protected static void setHaltCurrentProccess(boolean newValue)
protected AbstractObjectSpy getInspectedObject()
protected void setInspectedObject(AbstractObjectSpy newValue)
public static Inspector basicInspect(java.lang.Object obj)
obj
- The object to look insidepublic static Inspector basicInspect(java.lang.String name, java.lang.Object obj)
name
- The name of the object in its program contextobj
- The object to look insidepublic static Inspector inspect(java.lang.Object obj)
obj
- The object to look insidepublic static Inspector inspect(java.lang.String name, java.lang.Object obj)
obj
- The object to look insidepublic static void basicInspectWait(java.lang.Object obj)
obj
- The object to look insidepublic static void basicInspectWait(java.lang.String name, java.lang.Object obj)
name
- The name of the object in its program contextobj
- The object to look insidepublic static void inspectWait(java.lang.Object obj)
obj
- The object to look insidepublic static void inspectWait(java.lang.String name, java.lang.Object obj)
name
- The name of the object in its program contextobj
- The object to look insidepublic static void bindInspector(java.lang.String className, java.lang.String inspectorName)
className
- The fully qualified name of the class or interfaceinspectorName
- The fully qualified class name of the associated inspectorpublic static AbstractObjectSpy getBasicObjectSpy(java.lang.Object obj)
obj
- The object to look insidepublic static AbstractObjectSpy getBasicObjectSpy(java.lang.String name, java.lang.Object obj)
name
- The name of the object in its program contextobj
- The object to look insidepublic static AbstractObjectSpy getObjectSpy(java.lang.Object obj)
obj
- The object to look insidepublic static AbstractObjectSpy getObjectSpy(java.lang.String name, java.lang.Object obj)
name
- The name the object has in the program contextobj
- The object to look insidepublic static java.lang.String fullIdentification()
public static java.lang.String shortIdentification()
public static void deactivateHalt()
public static void halt()
public static java.lang.String getProgSignature()
public static void main(java.lang.String[] args)
protected static BasicInspector inspectIn(InspectionWindowController controller, int where, java.lang.String name, java.lang.Object obj)
controller
- The controller to open the object with.where
- Defines where to open the new inspection view (see InspectionWindowController
)name
- The name of the objectobj
- The object to inspectprotected static BasicInspector basicInspectIn(InspectionWindowController controller, int where, java.lang.String name, java.lang.Object obj)
controller
- The controller to open the object with.where
- Defines where to open the new inspection view (see InspectionWindowController
)name
- The name of the objectobj
- The object to inspectprotected static BasicInspector openInspectorIn(InspectionWindowController controller, int where, BasicInspector inspector, java.lang.String name, java.lang.Object obj)
controller
- The controller to open the object with.where
- Defines where to open the new inspection view (see InspectionWindowController
)name
- The name of the objectobj
- The object to inspectprotected static Inspector launchInspectorOn(BasicInspector inspector, java.lang.String name, java.lang.Object obj)
inspector
- The inspector that should be started.protected static BasicInspector getInspectorFor(java.lang.Object obj)
protected static org.pfsw.reflect.ClassInfo findInspectorClassInfoFor(java.lang.Object object)
protected static org.pfsw.joi.ClassAssociations inspectorBinding()
protected static void initializeInspectorBinding()
protected static void basicBindInspector(java.lang.String className, java.lang.String inspectorName)
protected static void registerController(InspectionWindowController controller)
controller
- The controller that should be registered.protected static void unregisterController(InspectionWindowController controller)
controller
- The controller to be unregistered.protected static boolean anyInspectorActive()
protected static boolean isHaltActive()
protected static void waitWhileHaltActive()
protected static org.pfsw.joi.ClassAssociations exportProviderRegistry()
protected static void initializeExportProviderRegistry()
protected static void closeAllControllers()
protected static java.lang.String getAboutInfoText()
protected static ExportProvider findExporterNamed(java.lang.String exporterId)
protected void inspectObject(java.lang.String name, java.lang.Object obj)
obj
- The object to look insideprotected AbstractObjectSpy objectSpyFor(java.lang.Object obj)
obj
- The object to inspectprotected AbstractObjectSpy objectSpyFor(java.lang.String name, java.lang.Object obj)
obj
- The object to inspect
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |