Lines 23-28
Link Here
|
23 |
import org.eclipse.jdt.internal.compiler.CompilationResult; |
23 |
import org.eclipse.jdt.internal.compiler.CompilationResult; |
24 |
import org.eclipse.jdt.internal.compiler.ast.Argument; |
24 |
import org.eclipse.jdt.internal.compiler.ast.Argument; |
25 |
import org.eclipse.jdt.internal.compiler.ast.Expression; |
25 |
import org.eclipse.jdt.internal.compiler.ast.Expression; |
|
|
26 |
import org.eclipse.jdt.internal.compiler.ast.FalseLiteral; |
26 |
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; |
27 |
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; |
27 |
import org.eclipse.jdt.internal.compiler.ast.ReturnStatement; |
28 |
import org.eclipse.jdt.internal.compiler.ast.ReturnStatement; |
28 |
import org.eclipse.jdt.internal.compiler.ast.Statement; |
29 |
import org.eclipse.jdt.internal.compiler.ast.Statement; |
Lines 77-82
Link Here
|
77 |
// "if pcd is not implemented in 1.1alpha1"); |
78 |
// "if pcd is not implemented in 1.1alpha1"); |
78 |
//XXX need to implement correctly |
79 |
//XXX need to implement correctly |
79 |
if (pointcut == null) return; |
80 |
if (pointcut == null) return; |
|
|
81 |
//if the expression is just "false", then there is no need to |
82 |
//generate that method |
83 |
//hint: This behaviour here is also exploited by IfPointcut.fastMatch ! |
84 |
if (this.expr.getClass()==FalseLiteral.class) return; |
80 |
testMethod = makeMethod(enclosingDec.compilationResult, enclosingDec); |
85 |
testMethod = makeMethod(enclosingDec.compilationResult, enclosingDec); |
81 |
AstUtil.addMethodDeclaration(typeDec, testMethod); |
86 |
AstUtil.addMethodDeclaration(typeDec, testMethod); |
82 |
} |
87 |
} |