Record Class SuperProxyType
java.lang.Object
java.lang.Record
org.sonar.plugins.python.api.types.v2.SuperProxyType
- All Implemented Interfaces:
PythonType
A proxy type returned by zero-argument
super() calls inside a method.
Member lookup delegates to the enclosing class's C3 MRO tail — i.e. the MRO
starting from the first parent (skipping the class itself).-
Field Summary
FieldsFields inherited from interface org.sonar.plugins.python.api.types.v2.PythonType
UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionSuperProxyType(ClassType ownerClassType) Creates an instance of aSuperProxyTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of theownerClassTyperecord component.resolveMember(String memberName) Attempts to resolve a PythonType's member It should return Optional.empty() when the member doesn't exist, and PythonType.UNKNOWN when the member may exist but can't be resolvedfinal StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.sonar.plugins.python.api.types.v2.PythonType
definitionLocation, displayName, hasMember, instanceDisplayName, isCompatibleWith, key, typeSource, unwrappedType
-
Field Details
-
SUPER_FQN
- See Also:
-
-
Constructor Details
-
SuperProxyType
Creates an instance of aSuperProxyTyperecord class.- Parameters:
ownerClassType- the value for theownerClassTyperecord component
-
-
Method Details
-
name
- Specified by:
namein interfacePythonType
-
resolveMember
Description copied from interface:PythonTypeAttempts to resolve a PythonType's member It should return Optional.empty() when the member doesn't exist, and PythonType.UNKNOWN when the member may exist but can't be resolved- Specified by:
resolveMemberin interfacePythonType
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
ownerClassType
Returns the value of theownerClassTyperecord component.- Returns:
- the value of the
ownerClassTyperecord component
-