1 16 17 package org.springframework.aop.support; 18 19 import java.io.Serializable ; 20 21 31 public abstract class AbstractExpressionPointcut implements ExpressionPointcut, Serializable { 32 33 private String location; 34 35 private String expression; 36 37 38 41 public void setLocation(String location) { 42 this.location = location; 43 } 44 45 51 public String getLocation() { 52 return this.location; 53 } 54 55 public void setExpression(String expression) { 56 this.expression = expression; 57 try { 58 onSetExpression(expression); 59 } 60 catch (IllegalArgumentException ex) { 61 if (this.location != null) { 63 throw new IllegalArgumentException ("Invalid expression at location [" + this.location + "]: " + ex); 64 } 65 else { 66 throw ex; 67 } 68 } 69 } 70 71 79 protected void onSetExpression(String expression) throws IllegalArgumentException { 80 } 81 82 85 public String getExpression() { 86 return this.expression; 87 } 88 89 } 90 | Popular Tags |