Guava Joiner.MapJoiner - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava Joiner.MapJoiner class.

This code example shows how to use the following methods:appendTo
  /** Implements {@link Annotation#toString}. */ 
  private static String annotationToString(Class<? extends Annotation> type,
      Map<String, Object> members) throws Exception {
    StringBuilder sb = new StringBuilder().append("@").append(type.getName()).append("(");
    JOINER.appendTo(sb, Maps.transformValues(members, DEEP_TO_STRING_FN));
    return sb.append(")").toString();
   * Returns true if the given annotation is retained at runtime. 
  public static boolean isRetainedAtRuntime(Class<? extends Annotation> annotationType) {
    Retention retention = annotationType.getAnnotation(Retention.class);
    return retention != null && retention.value() == RetentionPolicy.RUNTIME;
  /** Returns the scope annotation on {@code type}, or null if none is specified. */ 
  public static Class<? extends Annotation> findScopeAnnotation(
      Errors errors, Class<?> implementation) {
This code example shows how to use the following methods:join
     * @param parameters 
     * @return 
    private static String doFormUrlEncode(Multimap<String, Object> parameters) {
        Multimap<String, String> urlEncodeMap = Multimaps.transformValues(parameters, new formUrlEncodeFunc());
        return queryMapJoiner.join(urlEncodeMap.entries());
     * @param pojo 
     * @return 
    private static Multimap<String, Object> pojoToMultiMap(Object pojo) {
        Map<String, ? extends Object> pojoMap = new BeanMap(pojo);
        Multimap<String, Object> res = HashMultimap.create();
        for (String key : pojoMap.keySet()) {
            if (!"class".equals(key)) {
                Object value = pojoMap.get(key);
                if (value instanceof Map)
See Code Examples for Guava Joiner.MapJoiner Methods: