1 10 package org.nanocontainer.aop.defaults; 11 12 import org.nanocontainer.aop.ComponentPointcut; 13 14 20 public class KeyEqualsComponentPointcut implements ComponentPointcut { 21 22 private final Object componentKey; 23 24 30 public KeyEqualsComponentPointcut(Object componentKey) { 31 if (componentKey == null) { 32 throw new NullPointerException ("componentKey cannot be null"); 33 } 34 this.componentKey = componentKey; 35 } 36 37 45 public boolean picks(Object componentKey) { 46 return this.componentKey.equals(componentKey); 47 } 48 49 } | Popular Tags |