All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.commons.configuration.tree.ConfigurationNodeVisitor Maven / Gradle / Ivy

Go to download

Tools to assist in the reading of configuration/preferences files in various formats

There is a newer version: 20041012.002804
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.configuration.tree;

/**
 * 

* Definition of a Visitor interface for a configuration node * structure. *

*

* The ConfigurationNode interface defines a visit(), * which simplifies traversal of a complex node hierarchy. A configuration node * implementation must provide a way of visiting all nodes in the current * hierarchy. This is a typical application of the GoF Visitor * pattern. *

* * @since 1.3 * @see ConfigurationNode * @author Oliver Heger */ public interface ConfigurationNodeVisitor { /** * Visits the specified node. This method is called before eventually * existing children of this node are processed. * * @param node the node to be visited */ void visitBeforeChildren(ConfigurationNode node); /** * Visits the specified node. This method is called after eventually * existing children of this node have been processed. * * @param node the node to be visited */ void visitAfterChildren(ConfigurationNode node); /** * Returns a flag whether the actual visit process should be aborted. This * method allows a visitor implementation to state that it does not need any * further data. It may be used e.g. by visitors that search for a certain * node in the hierarchy. After that node was found, there is no need to * process the remaining nodes, too. * * @return a flag if the visit process should be stopped */ boolean terminate(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy