java.lang.Object
ushiosan.jvm.internal.print.UToStringManagerImpl
- All Implemented Interfaces:
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 instancevoidremoveComponent(@NotNull Class<? extends UToStringComponent> cls) Removes a component from the component listGenerates a text with the representation of the object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ushiosan.jvm.print.UToStringManager
registerComponents, toString
-
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.- Specified by:
toStringin interfaceUToStringManager- 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
-
registerComponent
registers a new component to the handler instance- Specified by:
registerComponentin interfaceUToStringManager- Parameters:
component- the new component to register
-
removeComponent
Removes a component from the component list- Specified by:
removeComponentin interfaceUToStringManager- Parameters:
cls- The class of the component you want to remove
-