Package ognl

Class ObjectNullHandler

  • All Implemented Interfaces:
    NullHandler

    public class ObjectNullHandler
    extends java.lang.Object
    implements NullHandler
    Implementation of NullHandler that returns null in all cases, so that NullPointerException will be thrown by the caller.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object nullMethodResult​(OgnlContext context, java.lang.Object target, java.lang.String methodName, java.lang.Object[] args)
      Method called on target returned null.
      java.lang.Object nullPropertyValue​(OgnlContext context, java.lang.Object target, java.lang.Object property)
      Property in target evaluated to null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObjectNullHandler

        public ObjectNullHandler()
    • Method Detail

      • nullMethodResult

        public java.lang.Object nullMethodResult​(OgnlContext context,
                                                 java.lang.Object target,
                                                 java.lang.String methodName,
                                                 java.lang.Object[] args)
        Description copied from interface: NullHandler
        Method called on target returned null.
        Specified by:
        nullMethodResult in interface NullHandler
        Parameters:
        context - the current execution context.
        target - the Object on which the method was called.
        methodName - the name of the method which was called.
        args - the arguments to the method that was called.
        Returns:
        the result Object containing the state of the method call that returned null.
      • nullPropertyValue

        public java.lang.Object nullPropertyValue​(OgnlContext context,
                                                  java.lang.Object target,
                                                  java.lang.Object property)
        Description copied from interface: NullHandler
        Property in target evaluated to null. Property can be a constant String property name or a DynamicSubscript.
        Specified by:
        nullPropertyValue in interface NullHandler
        Parameters:
        context - the current execution context.
        target - the Object to which the property belongs.
        property - the property whose value evaluated to null.
        Returns:
        the result Object containing the state of the property that evaluated to null.