public final class PojoIntrospector extends Object
Objects
using arguments in serialized form.
String s =
Constructor and Description |
---|
PojoIntrospector(Object o)
Shortcut for calling
|
PojoIntrospector(Object o,
ReaderParser p)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
invokeMethod(Method method,
Reader args)
Primary method.
|
Object |
invokeMethod(String method,
String args)
Convenience method for invoking argument from method signature (@see
ClassUtils.getMethodSignature(Method) . |
public PojoIntrospector(Object o, ReaderParser p)
o
- The object on which Java methods will be invoked.p
- The parser to use to parse the method arguments.
If JsonParser.DEFAULT
is used.public PojoIntrospector(Object o)
new PojoIntrospector(o, null );
o
- The object on which Java methods will be invoked.public Object invokeMethod(Method method, Reader args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, ParseException, IOException
method
- The method being invoked.args
- The arguments to pass as parameters to the method.
These will automatically be converted to the appropriate object type if possible.
Can be IllegalAccessException
- If the Constructor
object enforces Java language access control and the underlying constructor is
inaccessible.IllegalArgumentException
- If one of the following occurs:
InvocationTargetException
- If the underlying constructor throws an exception.ParseException
- If the input contains a syntax error or is malformed.IOException
public Object invokeMethod(String method, String args) throws NoSuchMethodException, IllegalArgumentException, InvocationTargetException, IllegalAccessException, ParseException, IOException
ClassUtils.getMethodSignature(Method)
.method
- The method being invoked.args
- The arguments to pass as parameters to the method.
These will automatically be converted to the appropriate object type if possible.
Can be NoSuchMethodException
- If method does not exist.IllegalAccessException
- If the Constructor
object enforces Java language access control and
the underlying constructor is inaccessible.IllegalArgumentException
- If one of the following occurs:
InvocationTargetException
- If the underlying constructor throws an exception.ParseException
- If the input contains a syntax error or is malformed.IOException
Copyright © 2018 Apache. All rights reserved.