public class GwtRemoteInspectorProxy extends Object implements Inspector
Leveraging Metawidget's separated inspection architecture, GwtRemoteInspectorProxy uses AJAX to pass objects to the server where the full power of Java introspection and reflection can be used to inspect them. This includes inspecting their annotations.
Note it is not possible to generically optimize this call to, say, only pass the class name
rather than the entire object. This is because some Inspectors
inspect the
value of the properties (eg. PropertyTypeInspector
). On a case-by-case
basis, however, such optimization is possible - see GwtMetawidget.rebind
.
Constructor and Description |
---|
GwtRemoteInspectorProxy()
Create a GwtRemoteInspectorProxy.
|
GwtRemoteInspectorProxy(String serviceEntryPoint)
Create a GwtRemoteInspectorProxy.
|
Modifier and Type | Method and Description |
---|---|
String |
inspect(Object toInspect,
String type,
String... names)
Inspect the given Object according to the given path, and return the result as a String
conforming to inspection-result-1.0.xsd.
|
void |
inspect(Object toInspect,
String type,
String[] names,
com.google.gwt.user.client.rpc.AsyncCallback<String> callback) |
public GwtRemoteInspectorProxy()
public GwtRemoteInspectorProxy(String serviceEntryPoint)
This version of the constructor allows the caller to override the 'service entry point' of
the GwtRemoteInspectorImpl
servlet. This can be useful for setting up multiple
servlets, each with their own metawidget.xml
configuration.
serviceEntryPoint
- override servlet path of serviceEntryPointpublic String inspect(Object toInspect, String type, String... names)
Inspector
Note: the method returns a String, rather than a DOM, to support the use of hetergenous technologies between the Inspectors and the Metawidgets. For example, GwtMetawidget is written in JavaScript but its Inspectors are written in Java.
Copyright © 2015. All Rights Reserved.