protected Method getAccessor(Object obj, Field field, boolean isGetter)
	{
		String name = field.getName();
		name = name.substring(0, 1).toUpperCase() + name.substring(1);

		if (!isGetter)
		{
			name = "set" + name;
		}
		else if (boolean.class.isAssignableFrom(field.getType()))
		{
			name = "is" + name;
		}
		else
		{
			name = "get" + name;
		}

		Method method = (accessors != null) ? accessors.get(name) : null;

		if (method == null)
		{
			try
			{
				if (isGetter)
				{
					method = getMethod(obj, name, null);
				}
				else
				{
					method = getMethod(obj, name,
							new Class[] { field.getType() });
				}
			}
			catch (Exception e1)
			{
				// ignore
			}

			// Adds accessor to cache
			if (method != null)
			{
				if (accessors == null)
				{
					accessors = new Hashtable<String, Method>();
				}

				accessors.put(name, method);
			}
		}

		return method;
	}