Interface UToStringManager

All Known Implementing Classes:
UToStringManagerImpl

public interface UToStringManager
  • Method Details

    • getInstance

      @NotNull static @NotNull UToStringManager getInstance()
      Generates an instance of the specified class and saves it so that only one instance exists throughout the entire program. If the JVM deletes such an instance, it is recreated.
      Returns:
      the object instance
    • toString

      @NotNull @NotNull String toString(@Nullable @Nullable Object object, boolean verbose)
      Generates a text with the representation of the object. Very similar to what the Object.toString() method does, but it ensures that all objects have an easily identifiable representation.
      Parameters:
      object - the object that you want to get the text representation
      verbose - option used to determine if the output will be long or simple
      Returns:
      object string representation
    • toString

      @NotNull default @NotNull String toString(@Nullable @Nullable Object object)
      Generates a text with the representation of the object. Very similar to what the Object.toString() method does, but it ensures that all objects have an easily identifiable representation.
      Parameters:
      object - the object that you want to get the text representation
      Returns:
      object string representation
    • registerComponent

      void registerComponent(@NotNull @NotNull UToStringComponent component)
      registers a new component to the handler instance
      Parameters:
      component - the new component to register
    • registerComponents

      default void registerComponents(UToStringComponent @NotNull ... components)
      register multiple components to the handler instance
      Parameters:
      components - the new components to register
      See Also:
    • removeComponent

      void removeComponent(@NotNull @NotNull Class<? extends UToStringComponent> cls)
      Removes a component from the component list
      Parameters:
      cls - The class of the component you want to remove