001 /*****************************************************************************
002 * Copyright (c) PicoContainer Organization. All rights reserved. *
003 * ------------------------------------------------------------------------- *
004 * The software in this package is published under the terms of the BSD *
005 * style license a copy of which has been included with this distribution in *
006 * the LICENSE.txt file. *
007 * *
008 * Idea by Rachel Davies, Original code by various *
009 *****************************************************************************/
010 package org.nanocontainer.aop.defaults;
011
012 import org.nanocontainer.aop.ComponentPointcut;
013 import org.nanocontainer.aop.PointcutsFactory;
014
015 /**
016 * Provides implementations of pointcut factory methods not supplied by the
017 * 'back-end' (nanning, dynop, etc.).
018 *
019 * @author Stephen Molitor
020 * @version $Revision: 3144 $
021 */
022 public abstract class AbstractPointcutsFactory implements PointcutsFactory {
023
024 public ComponentPointcut component(Object componentKey) {
025 return new KeyEqualsComponentPointcut(componentKey);
026 }
027
028 public ComponentPointcut componentName(String regex) {
029 return new NameMatchesComponentPointcut(regex);
030 }
031
032 }