code: public <T> BinaryValue getRiakBucketName(T obj)
      {
          BinaryValue bucketName = null;
  
          if (riakBucketNameGetter != null)
          {
              if (riakBucketNameGetter.getReturnType().isArray())
              {
                  Object o = getMethodValue(riakBucketNameGetter, obj);
                  if (o != null)
                  {
                      bucketName = BinaryValue.create((byte[]) o);
                  }
              }
              else
              {
                  Object o = getMethodValue(riakBucketNameGetter, obj);
                  if (o != null)
                  {
                      bucketName = BinaryValue.create((String) o);
                  }
              }
          }
          else if (riakBucketNameField != null)
          {
              if (riakBucketNameField.getType().equals(String.class))
              {
                  Object o = getFieldValue(riakBucketNameField, obj);
                  if (o != null)
                  {
                      bucketName = BinaryValue.create((String) o);
                  }
              }
              else
              {
                  Object o = getFieldValue(riakBucketNameField, obj);
                  if (o != null)
                  {
                      bucketName = BinaryValue.create((byte[]) o);
                  }
              }
          }
  
          return bucketName;
      }
docs: TODO: charset in annotation