code: public static Accessor getAccessorForProperty(final Class<?> clazz, final String propertyName)
      {
          int splitPoint = propertyName.indexOf('.');
          if (splitPoint > 0)
          {
              String firstPart = propertyName.substring(0, splitPoint);
              String secondPart = propertyName.substring(splitPoint + 1);
              return new NestedAccessor(clazz, firstPart, secondPart);
          }
          return new SimpleAccessor(clazz, propertyName);
      }
docs: Create an {@link Accessor} for the given property. A property may be nested using the dot character.
  
  @param clazz
  the type containing the property.
  @param propertyName
  the name of the property.
  @return an Accessor for the property.