Class Naming
java.lang.Object
gov.nasa.jpl.aerie.contrib.streamline.debugging.Naming
Allows anything that uses reference equality to be given a name.
By handling naming in a static auxiliary data structure, we achieve several goals: 1) Naming doesn't bloat interfaces like Resource and DynamicsEffect. 2) Names can be applied to classes and interfaces after-the-fact, including applying names to classes and interfaces that can't be modified, like library code. 3) Naming is nevertheless globally available. (Unlike passing the name in a parallel parameter, for example.)
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringargsFormat(Collection<?> collection) Get the name for thing.static StringGet the name for thing.static <T> TRegister a name for thing, as a function of args' names.
-
Method Details
-
name
Register a name for thing, as a function of args' names. If any of the args are anonymous, so is this thing. -
getName
Get the name for thing. If thing has no registered name and no synonyms, returns empty. -
getName
Get the name for thing. Use anonymousName for anything without a name instead of returning empty. -
argsFormat
-