Interface HasSpecialDefaultValues

All Known Implementing Classes:
Json2XmlValidator, RestListener, SoapValidator, WebServiceListener, WsdlXmlValidator, XmlValidator

public interface HasSpecialDefaultValues
Interface to be implemented when a class has one or more special default values (i.e. a default value of attribute X depends on the value of attribute Y). When a class implements this interface the getSpecialDefaultValue method will be called for every attribute used in the Ibis configuration when it is being loaded and checked for default values (warning "already has a default value"). At this time the set methods and the configure method aren't called yet but the values specified in the Ibis configuration are known. To make use of these values this interface should be implemented. Please note that the normal get method of the attribute should return an object or when it returns a primitive should not return a null value. I.e. when the return type is boolean but a Boolean null value is returned a NullPointerException (wrapped in an InvocationTargetException) will be thrown and written to the logfile as a warning by the code checking for default values because reflection is being used to call the get method. From the javadoc of java.lang.reflect.InvocationHandler: If the value returned by this method is null and the interface method's return type is primitive, then a NullPointerException will be thrown.