|
PicoContainer example source code file (PicoVisitor.java)
The PicoContainer PicoVisitor.java source code
/*****************************************************************************
* Copyright (C) PicoContainer Organization. All rights reserved. *
* ------------------------------------------------------------------------- *
* The software in this package is published under the terms of the BSD *
* style license a copy of which has been included with this distribution in *
* the LICENSE.txt file. *
*****************************************************************************/
package org.picocontainer;
/**
* Interface realizing a visitor pattern for {@link PicoContainer} as described in the GoF.
* The visitor should visit the container, its children, all registered {@link ComponentAdapter}
* instances and all instantiated components.
*
* @author Aslak Hellesøy
* @author Jörg Schaible
* @version $Revision: 3602 $
*/
public interface PicoVisitor {
/**
* Entry point for the PicoVisitor traversal. The given node is the first object, that is
* asked for acceptance. Only objects of type {@link PicoContainer}, {@link ComponentAdapter},
* or {@link Parameter} are valid.
*
* @param node the start node of the traversal.
* @return a visitor-specific value.
* @throws IllegalArgumentException in case of an argument of invalid type.
*/
Object traverse(Object node);
/**
* Visit a {@link PicoContainer} that has to accept the visitor.
*
* @param pico the visited container.
*/
void visitContainer(PicoContainer pico);
/**
* Visit a {@link ComponentAdapter} that has to accept the visitor.
*
* @param componentAdapter the visited ComponentAdapter.
*/
void visitComponentAdapter(ComponentAdapter componentAdapter);
/**
* Visit a {@link Parameter} that has to accept the visitor.
*
* @param parameter the visited Parameter.
*/
void visitParameter(Parameter parameter);
}
Other PicoContainer examples (source code examples)Here is a short list of links related to this PicoContainer PicoVisitor.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.