Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java')
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java
new file mode 100644
index 00000000..89eba92b
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java
@@ -0,0 +1,48 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public class MethodExistenceCheck extends EclipseCheck {
+
+ private static final long serialVersionUID = 2L;
+
+ public MethodExistenceCheck(String message, String projectName, String className, String methodName,
+ String commaSeparatedParamTypes) {
+ super("resource exists", message, EvalTrigger.ON_CHANGE);
+ setProjectName(projectName);
+ setClassName(className);
+ setMethodName(methodName);
+ setCommaSeparatedParamTypes(commaSeparatedParamTypes);
+ }
+
+ private void setCommaSeparatedParamTypes(String commaSeparatedParamTypes) {
+ setParameter("commaSeparatedParamTypes", commaSeparatedParamTypes);
+ }
+
+ private void setMethodName(String methodName) {
+ setParameter("methodName", methodName);
+ }
+
+ private void setProjectName(String projectName) {
+ setParameter("projectName", projectName);
+ }
+
+ private void setClassName(String className) {
+ setParameter("className", className);
+ }
+}

Back to the top