Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.nanocontainer.aop.defaults
Class NameMatchesComponentPointcut

    java.lang.Object
      org.nanocontainer.aop.defaults.NameMatchesComponentPointcut

All Implemented Interfaces:
  ComponentPointcut

    public class NameMatchesComponentPointcut

extends Object
implements ComponentPointcut

Component pointcut that matches the component name against a regular expression.

Version:
  $Revision: 3144 $
Author:
  Stephen Molitor

Constructor Summary
`NameMatchesComponentPointcut(String regex)` Creates a new `NameMatchesComponentPointcut` that will match the component key against the given regular expression.

Method Summary
`boolean` | `picks(Object componentKey)` Tests to see if the component key's toString() value matches the regular expression passed to the constructor.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NameMatchesComponentPointcut

    public NameMatchesComponentPointcut(String regex)
                                 throws MalformedRegularExpressionException

  Creates a new `NameMatchesComponentPointcut` that will match the component key against the given regular expression. The regular expression must be an ORO Perl5 regular expression.

  Parameters:
    `regex` - the regular expression to match against the component name.
  Throws:
    `MalformedRegularExpressionException` - if the regular expression is invalid.

Method Detail

### picks

    public boolean picks(Object componentKey)

  Tests to see if the component key's toString() value matches the regular expression passed to the constructor.

  Specified by:
    `picks` in interface `ComponentPointcut`
  Parameters:
    `componentKey` - the component key to match against.
  Returns:
    true if the regular expression passed to the constructor matches against `componentKey`, else false.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2007 Codehaus. All Rights Reserved.