- All Known Implementing Classes:
UToStringManagerImpl
public interface UToStringManager
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull UToStringManagerGenerates an instance of the specified class and saves it so that only one instance exists throughout the entire program.voidregisterComponent(@NotNull UToStringComponent component) registers a new component to the handler instancedefault voidregisterComponents(UToStringComponent @NotNull ... components) register multiple components to the handler instancevoidremoveComponent(@NotNull Class<? extends UToStringComponent> cls) Removes a component from the component listGenerates a text with the representation of the object.Generates a text with the representation of the object.
-
Method Details
-
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
Generates a text with the representation of the object. Very similar to what theObject.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 representationverbose- option used to determine if the output will be long or simple- Returns:
- object string representation
-
toString
Generates a text with the representation of the object. Very similar to what theObject.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
registers a new component to the handler instance- Parameters:
component- the new component to register
-
registerComponents
register multiple components to the handler instance- Parameters:
components- the new components to register- See Also:
-
removeComponent
Removes a component from the component list- Parameters:
cls- The class of the component you want to remove
-