Interface ValueGenerator

  • public interface ValueGenerator
    A callback object used in the process of bean property set operations.
    See Also:
    • Method Detail

      • getValue

        Object getValue​(String name)
                 throws Exception
        Calls back when the bean utility has verified that it can set the bean property. You are asked for the value to set here and not earlier on because we want to delay any processing necessary to derive this value until the last possible moment. Sometimes deriving the value can be costly, there is no sense requiring the value prior to simple checks happening first.
        name - the property name for the requested value
        the value of the property for setting on the bean
        Exception - throw an exception here if/when your code encounters a terminal state