Package org.apache.juneau.parser
Class ParserListener
java.lang.Object
org.apache.juneau.parser.ParserListener
- Direct Known Subclasses:
- ParserListener.Void
Class for listening for certain parse events during a document parse.
 
See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classRepresents no parser listener.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidonBeanSetterException(ParserSession session, Throwable t, BeanPropertyMeta p) Called when an exception is thrown when trying to call a bean setter method.voidonError(ParserSession session, Throwable t, String msg) Called when an error occurs during parsing but is ignored.<T> voidonUnknownBeanProperty(ParserSession session, String propertyName, Class<T> beanClass, T bean) Gets called when an unknown bean property is detected in a document.
- 
Constructor Details- 
ParserListenerpublic ParserListener()
 
- 
- 
Method Details- 
onUnknownBeanPropertypublic <T> void onUnknownBeanProperty(ParserSession session, String propertyName, Class<T> beanClass, T bean) Gets called when an unknown bean property is detected in a document.This method only gets called if BeanContext.Builder.ignoreUnknownBeanProperties()setting istrue . Otherwise, the parser will throw aParseException.- Type Parameters:
- T- The class type of the bean.
- Parameters:
- session- The parser session.
- propertyName- The property name encountered in the document.
- beanClass- The bean class.
- bean- The bean.
 
- 
onBeanSetterExceptionCalled when an exception is thrown when trying to call a bean setter method.- Parameters:
- session- The serializer session.
- t- The throwable that was thrown by the setter method.
- p- The bean property we had an issue on.
 
- 
onErrorCalled when an error occurs during parsing but is ignored.- Parameters:
- session- The parser session.
- t- The throwable that was thrown by the getter method.
- msg- The error message.
 
 
-