Package org.apache.juneau.objecttools
Class ObjectViewer
java.lang.Object
org.apache.juneau.objecttools.ObjectViewer
- All Implemented Interfaces:
ObjectTool<ViewArgs>
POJO model viewer.
This class is designed to extract properties from collections of maps or beans.
Example:
MyBean[]
The tool can be used against the following data types:
- Arrays/collections of maps or beans.
- Singular maps or beans.
See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectViewercreate()Static creator.Runs this viewer on the specified collection or array of objects.run(BeanSession session, Object input, ViewArgs args) Converts the specified input to some other output.Runs this viewer on a singleton object.
-
Field Details
-
DEFAULT
Default reusable searcher.
-
-
Constructor Details
-
ObjectViewer
public ObjectViewer()
-
-
Method Details
-
create
Static creator.- Returns:
- A new
ObjectViewerobject.
-
run
Description copied from interface:ObjectToolConverts the specified input to some other output.- Specified by:
runin interfaceObjectTool<ViewArgs>- Parameters:
session- The current bean session.input- The input POJO.args- The arguments.- Returns:
- The output POJO.
-
run
Runs this viewer on the specified collection or array of objects.- Parameters:
input- The input. Must be an array or collection.args- The view args. SeeViewArgsfor format.- Returns:
- The extracted properties from the collection of objects.
-
runSingle
Runs this viewer on a singleton object.- Parameters:
input- The input. Must be a singleton object.args- The view args. SeeViewArgsfor format.- Returns:
- The extracted properties from the object.
-