Author: scabanovich
Date: 2010-12-28 11:40:48 -0500 (Tue, 28 Dec 2010)
New Revision: 27768
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java 2010-12-28
16:38:00 UTC (rev 27767)
+++
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java 2010-12-28
16:40:48 UTC (rev 27768)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.common.util;
+import org.eclipse.jdt.core.IMethod;
+
/**
*
* @author V. Kabanovich
@@ -31,6 +33,14 @@
&& numberOfParameters == 1);
}
+ public static boolean isGetter(IMethod method) {
+ return isGetter(method.getElementName(), method.getNumberOfParameters());
+ }
+
+ public static boolean isSetter(IMethod method) {
+ return isSetter(method.getElementName(), method.getNumberOfParameters());
+ }
+
public static String getPropertyName(String methodName) {
if(isGetter(methodName, 0) || isSetter(methodName, 1)) {
StringBuffer name = new StringBuffer(methodName);