Code example for Joiner.MapJoiner

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) {