1 12 package org.aspectj.internal.lang.reflect; 13 14 import org.aspectj.lang.reflect.PerClauseKind; 15 import org.aspectj.lang.reflect.PointcutBasedPerClause; 16 import org.aspectj.lang.reflect.PointcutExpression; 17 18 22 public class PointcutBasedPerClauseImpl extends PerClauseImpl implements 23 PointcutBasedPerClause { 24 25 private final PointcutExpression pointcutExpression; 26 27 public PointcutBasedPerClauseImpl(PerClauseKind kind, 28 String pointcutExpression) { 29 super(kind); 30 this.pointcutExpression = new PointcutExpressionImpl(pointcutExpression); 31 } 32 33 public PointcutExpression getPointcutExpression() { 34 return pointcutExpression; 35 } 36 37 public String toString() { 38 StringBuffer sb = new StringBuffer (); 39 switch(getKind()) { 40 case PERCFLOW: sb.append("percflow("); break; 41 case PERCFLOWBELOW: sb.append("percflowbelow("); break; 42 case PERTARGET: sb.append("pertarget("); break; 43 case PERTHIS: sb.append("perthis("); break; 44 } 45 sb.append(this.pointcutExpression.asString()); 46 sb.append(")"); 47 return sb.toString(); 48 } 49 } 50 | Popular Tags |