Record Class PythonContextRuntime.PythonClassReference

java.lang.Object
java.lang.Record
io.micronaut.context.python.PythonContextRuntime.PythonClassReference
Record Components:
packageName - The Python package, or null for top-level classes
rootName - The top-level Python import/member name
nestedMemberNames - The nested member names below the root class
displayName - The class display name used in diagnostics
cacheKey - The stable class cache key used by pooled contexts
Enclosing class:
PythonContextRuntime

public static record PythonContextRuntime.PythonClassReference(@Nullable String packageName, String rootName, String[] nestedMemberNames, String displayName, String cacheKey) extends Record
Pre-split Python class identity used by generated bridge code.
Since:
5.2.0
Author:
Micronaut Team
  • Constructor Details

    • PythonClassReference

      public PythonClassReference(@Nullable String packageName, String rootName, String[] nestedMemberNames, String displayName, String cacheKey)
      Create a Python class reference.
      Parameters:
      packageName - The Python package
      rootName - The top-level Python import/member name
      nestedMemberNames - The nested member names below the root class
      displayName - The class display name used in diagnostics
      cacheKey - The stable class cache key used by pooled contexts
  • Method Details

    • nestedMemberNames

      public String[] nestedMemberNames()
      Returns the value of the nestedMemberNames record component.
      Returns:
      the value of the nestedMemberNames record component
    • toString

      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

      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

      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.
    • packageName

      public @Nullable String packageName()
      Returns the value of the packageName record component.
      Returns:
      the value of the packageName record component
    • rootName

      public String rootName()
      Returns the value of the rootName record component.
      Returns:
      the value of the rootName record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • cacheKey

      public String cacheKey()
      Returns the value of the cacheKey record component.
      Returns:
      the value of the cacheKey record component