    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *     https://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017package org.apache.commons.configuration2.io;
    018
    019/**
    020 * An adapter class simplifying the implementation of custom {@code FileHandlerListener} classes.
    021 * <p>
    022 * This class provides empty dummy implementations for all methods defined by the {@code FileHandlerListener} interface.
    023 * Custom listener implementations can extend this adapter class and override only the methods they actually need.
    024 * </p>
    025 *
    026 * @since 2.0
    027 */
    028public class FileHandlerListenerAdapter implements FileHandlerListener {
    029
    030    /**
    031     * Constructs a new instance.
    032     */
    033    public FileHandlerListenerAdapter() {
    034        // empty
    035    }
    036
    037    @Override
    038    public void loaded(final FileHandler handler) {
    039        // empty
    040    }
    041
    042    @Override
    043    public void loading(final FileHandler handler) {
    044        // empty
    045    }
    046
    047    @Override
    048    public void locationChanged(final FileHandler handler) {
    049        // empty
    050    }
    051
    052    @Override
    053    public void saved(final FileHandler handler) {
    054        // empty
    055    }
    056
    057    @Override
    058    public void saving(final FileHandler handler) {
    059        // empty
    060    }
    061}