Record Class ModuleDesc

java.lang.Object
java.lang.Record
gaiasky.script.v2.meta.ModuleDesc
Record Components:
name - The module name.
path - The module path.
methodMap - The method map.
modules - References to the inner modules.

public record ModuleDesc(String name, Path path, Class<?> clazz, Map<String, com.badlogic.gdx.utils.Array<Method>> methodMap, com.badlogic.gdx.utils.Array<ModuleDesc> modules) extends Record
Represents an APIv2 module.
  • Constructor Details Link icon

    • ModuleDesc Link icon

      public ModuleDesc(String name, Path path, Class<?> clazz, Map<String, com.badlogic.gdx.utils.Array<Method>> methodMap, com.badlogic.gdx.utils.Array<ModuleDesc> modules)
      Creates an instance of a ModuleDesc record class.
      Parameters:
      name - the value for the name record component
      path - the value for the path record component
      clazz - the value for the clazz record component
      methodMap - the value for the methodMap record component
      modules - the value for the modules record component
  • Method Details Link icon

    • of Link icon

      public static ModuleDesc of(Path path, Class<?> clazz)
      Creates a new ModuleDesc instance from the given root path and class.
      Parameters:
      path - The root path.
      clazz - The class.
      Returns:
      The new ModuleDesc.
    • of Link icon

      public static ModuleDesc of(Path path, Class<?> clazz, boolean prefixPath)
      Creates a new ModuleDesc instance from the given root path and class.
      Parameters:
      path - The root path.
      clazz - The class.
      prefixPath - Use the full module paths in the module maps.
      Returns:
      The new ModuleDesc.
    • toString Link icon

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode Link icon

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals Link icon

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name Link icon

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • path Link icon

      public Path path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • clazz Link icon

      public Class<?> clazz()
      Returns the value of the clazz record component.
      Returns:
      the value of the clazz record component
    • methodMap Link icon

      public Map<String, com.badlogic.gdx.utils.Array<Method>> methodMap()
      Returns the value of the methodMap record component.
      Returns:
      the value of the methodMap record component
    • modules Link icon

      public com.badlogic.gdx.utils.Array<ModuleDesc> modules()
      Returns the value of the modules record component.
      Returns:
      the value of the modules record component