public class ParserListener extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ParserListener.Null
Represents no parser listener.
|
Constructor and Description |
---|
ParserListener() |
Modifier and Type | Method and Description |
---|---|
void |
onError(ParserSession session,
Throwable t,
String msg)
Called when an error occurs during parsing but is ignored.
|
<T> void |
onUnknownBeanProperty(ParserSession session,
String propertyName,
Class<T> beanClass,
T bean)
Gets called when an unknown bean property is detected in a document.
|
public ParserListener()
public <T> void onUnknownBeanProperty(ParserSession session, String propertyName, Class<T> beanClass, T bean)
This method only gets called if BeanContext.BEAN_ignoreUnknownBeanProperties
setting is ParseException
.
T
- The class type of the bean.session
- The parser session.propertyName
- The property name encountered in the document.beanClass
- The bean class.bean
- The bean.public void onError(ParserSession session, Throwable t, String msg)
session
- The parser session.t
- The throwable that was thrown by the getter method.msg
- The error message.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.