Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Sep 25, 2019
1 parent 17c423f commit 357beb2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public int hashCode() {

@Override
public String toString() {
return "ComposablePointcut: " + this.classFilter + ", " + this.methodMatcher;
return getClass().getName() + ": " + this.classFilter + ", " + this.methodMatcher;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@ public DefaultIntroductionAdvisor(Advice advice, @Nullable IntroductionInfo intr
/**
* Create a DefaultIntroductionAdvisor for the given advice.
* @param advice the Advice to apply
* @param intf the interface to introduce
* @param ifc the interface to introduce
*/
public DefaultIntroductionAdvisor(DynamicIntroductionAdvice advice, Class<?> intf) {
public DefaultIntroductionAdvisor(DynamicIntroductionAdvice advice, Class<?> ifc) {
Assert.notNull(advice, "Advice must not be null");
this.advice = advice;
addInterface(intf);
addInterface(ifc);
}


/**
* Add the specified interface to the list of interfaces to introduce.
* @param intf the interface to introduce
* @param ifc the interface to introduce
*/
public void addInterface(Class<?> intf) {
Assert.notNull(intf, "Interface must not be null");
if (!intf.isInterface()) {
throw new IllegalArgumentException("Specified class [" + intf.getName() + "] must be an interface");
public void addInterface(Class<?> ifc) {
Assert.notNull(ifc, "Interface must not be null");
if (!ifc.isInterface()) {
throw new IllegalArgumentException("Specified class [" + ifc.getName() + "] must be an interface");
}
this.interfaces.add(intf);
this.interfaces.add(ifc);
}

@Override
Expand All @@ -113,8 +113,8 @@ public void validateInterfaces() throws IllegalArgumentException {
for (Class<?> ifc : this.interfaces) {
if (this.advice instanceof DynamicIntroductionAdvice &&
!((DynamicIntroductionAdvice) this.advice).implementsInterface(ifc)) {
throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " +
"does not implement interface [" + ifc.getName() + "] specified for introduction");
throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " +
"does not implement interface [" + ifc.getName() + "] specified for introduction");
}
}
}
Expand Down

0 comments on commit 357beb2

Please sign in to comment.