jodd-core/src/main/java/jodd/util/ClassUtil.java
public static boolean isBeanProperty(final Method method) {
		if (isObjectMethod(method)) {
			return false;
		}
		String methodName = method.getName();
		Class returnType = method.getReturnType();
		Class[] paramTypes =  method.getParameterTypes();
		if (methodName.startsWith(METHOD_GET_PREFIX)) {		// getter method must starts with 'get' and it is not getClass()
			if ((returnType != null) && (paramTypes.length == 0)) {	// getter must have a return type and no arguments
				return true;
			}
		} else if (methodName.startsWith(METHOD_IS_PREFIX)) {		    // ister must starts with 'is'
			if ((returnType != null)  && (paramTypes.length == 0)) {	// ister must have return type and no arguments
				return true;
			}
		} else if (methodName.startsWith(METHOD_SET_PREFIX)) {	// setter must start with a 'set'
			if (paramTypes.length == 1) {				        // setter must have just one argument
				return true;
			}
		}
		return false;
	}
public static boolean isBeanProperty(final Method method) {
		if (isObjectMethod(method)) {
			return false;
		}
		String methodName = method.getName();
		Class returnType = method.getReturnType();
		Class[] paramTypes =  method.getParameterTypes();
		if (methodName.startsWith(METHOD_GET_PREFIX)) {		// getter method must starts with 'get' and it is not getClass()
			if ((returnType != null) && (paramTypes.length == 0)) {	// getter must have a return type and no arguments
				return true;
			}
		} else if (methodName.startsWith(METHOD_IS_PREFIX)) {		    // ister must starts with 'is'
			if ((returnType != null)  && (paramTypes.length == 0)) {	// ister must have return type and no arguments
				return true;
			}
		} else if (methodName.startsWith(METHOD_SET_PREFIX)) {	// setter must start with a 'set'
			if (paramTypes.length == 1) {				        // setter must have just one argument
				return true;
			}
		}
		return false;
	}
public static boolean isBeanProperty ( final Method method ) { if ( isObjectMethod ( method ) ) { return false ; } String methodName = method . getName ( ) ; Class returnType = method . getReturnType ( ) ; Class [ ] paramTypes = method . getParameterTypes ( ) ; if ( methodName . startsWith ( METHOD_GET_PREFIX ) ) { // getter method must starts with 'get' and it is not getClass() if ( ( returnType != null ) && ( paramTypes . length == 0 ) ) { // getter must have a return type and no arguments return true ; } } else if ( methodName . startsWith ( METHOD_IS_PREFIX ) ) { // ister must starts with 'is' if ( ( returnType != null ) && ( paramTypes . length == 0 ) ) { // ister must have return type and no arguments return true ; } } else if ( methodName . startsWith ( METHOD_SET_PREFIX ) ) { // setter must start with a 'set' if ( paramTypes . length == 1 ) { // setter must have just one argument return true ; } } return false ; }
Returns <code>true</code> if method is a bean property.
Returns <code > true< / code > if method is a bean property .