@Override
    protected void setLeaf(String name, DefLine defLine, String comment) throws IllegalArgumentException {
        DefLine.Type type = defLine.getType();
        // TODO: why the !is... conditions?
        if (!isMap && !isArray && isInitialized) {
            throw new IllegalArgumentException(name + " is already defined");
        }
        isInitialized = true;
        checkMyName(name);
        if (!type.name.equalsIgnoreCase(getType())) {
            throw new IllegalArgumentException("Type " + type.name + " does not match " + getType());
        }
        setValue(defLine.getDefault());
        setComment(comment);
        restart |= defLine.getRestart();
    }
@param defaultValue the value to check.
@throws IllegalArgumentException if the value is illegal according to the node type.
configgen/src/main/java/com/yahoo/config/codegen/LeafCNode.java