Class ParserListener

java.lang.Object
org.apache.juneau.parser.ParserListener
Direct Known Subclasses:
ParserListener.Void

public class ParserListener extends Object
Class for listening for certain parse events during a document parse.
See Also:
  • Constructor Details

  • Method Details

    • onUnknownBeanProperty

      public <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 is true. Otherwise, the parser will throw a ParseException.

      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.
    • onBeanSetterException

      Called 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.
    • onError

      public void onError(ParserSession session, Throwable t, String msg)
      Called 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.