All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aya.generic.AyaDocile Maven / Gradle / Ivy

There is a newer version: 0.34.0
Show newest version
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.generic;

import org.aya.prettier.AyaPrettierOptions;
import org.aya.pretty.doc.Doc;
import org.aya.util.prettier.PrettierOptions;
import org.jetbrains.annotations.Debug;
import org.jetbrains.annotations.NotNull;

@FunctionalInterface
@Debug.Renderer(text = "toDoc(AyaPrettierOptions.debug()).debugRender()")
public interface AyaDocile /*extends Docile*/ {
  /**
   * Always prefer using {@link #toDoc(PrettierOptions)} instead,
   * this method is intended for non-user-facing pretty printing,
   * such as assertions, testing, etc.
   */
  default @NotNull String easyToString() {
    return toDoc(AyaPrettierOptions.pretty()).debugRender();
  }

  @NotNull Doc toDoc(@NotNull PrettierOptions options);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy