Enum Class GObjectRegistry

java.lang.Object
java.lang.Enum<GObjectRegistry>
com.j3d.engine.scene.nodes.geometry.GObjectRegistry
All Implemented Interfaces:
Serializable, Comparable<GObjectRegistry>, Constable

public enum GObjectRegistry extends Enum<GObjectRegistry>
Defines the main registry for checking for GObjects, primarily used by these subsystems:
Author:
Lehlogonolo Poole
  • Enum Constant Details

  • Field Details

    • clazz

      private final Class<? extends GObject> clazz
      The actual class
    • simpleName

      private final String simpleName
      The simple name, usually the exact same name used in command usage strings and by the properties menu.
    • type

      private final CmdToken.Type type
      the command token type associated with this gobject.
    • engineObjectType

      private final EngineObject.Type engineObjectType
  • Constructor Details

  • Method Details

    • values

      public static GObjectRegistry[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GObjectRegistry valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getClasses

      public static ArrayList<Class<?>> getClasses()
    • forEach

      public static void forEach(Consumer<GObjectRegistry> consumer)
    • getClazz

      public Class<? extends GObject> getClazz()
    • getSimpleName

      public String getSimpleName()
      Returns the simple name of the GObject, typically used in command usage strings and property menus.
      Returns:
      The simple name of the GObject.
    • getType

      public CmdToken.Type getType()
      Retrieves the command token type associated with this GObject.
      Returns:
      The command token type.
    • fromClass

      public static GObjectRegistry fromClass(Class<?> clazz)
      Retrieves a GObjectRegistry entry based on its associated GObject class.
      Parameters:
      clazz - The class to look up.
      Returns:
      The corresponding GObjectRegistry entry, or null if not found.
    • isGObject

      public static boolean isGObject(Class<?> clazz)
      Checks if the given class is one of the registered GObject types.
      Parameters:
      clazz - The class to check.
      Returns:
      true if the class is a registered GObject, false otherwise.
    • getSimpleName

      public static String getSimpleName(Class<?> clazz)
      Retrieves the simple name for a given GObject class.
      Parameters:
      clazz - The class for which to get the simple name.
      Returns:
      The simple name string, or null if the class is not a registered GObject.
    • fuzzyMatch

      public static boolean fuzzyMatch(String input)
      Performs a fuzzy match to check if the input string contains the simple name of any registered GObject.
      Parameters:
      input - The string to check against registered GObject simple names.
      Returns:
      true if the input string contains any GObject's simple name, false otherwise.
    • tHintsUsageStringTypeMatch

      public static boolean tHintsUsageStringTypeMatch(String letters)
      Checks if the given string matches a specific pattern derived from the simple name of a registered GObject. The pattern is formed by repeating the first two characters of the simple name twice (e.g., "curve" -> "cucu", "line" -> "lili"). This is primarily used for typing hints in command line interfaces.
      Parameters:
      letters - The string to match.
      Returns:
      true if the string matches the pattern for any registered GObject, false otherwise.
      See Also:
    • isGObject

      public static boolean isGObject(EngineObject.Type type)