Record Class MethodInvocationMatcher.Token.ReceiverSupertype
java.lang.Object
java.lang.Record
com.google.errorprone.matchers.method.MethodInvocationMatcher.Token.ReceiverSupertype
- All Implemented Interfaces:
MethodInvocationMatcher.Token
- Enclosing interface:
MethodInvocationMatcher.Token
public static record MethodInvocationMatcher.Token.ReceiverSupertype(String receiverSupertype)
extends Record
implements MethodInvocationMatcher.Token
A token specifying that the class of the object on which the method is being invoked must be
a subtype of another type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MethodInvocationMatcher.Token
MethodInvocationMatcher.Token.DefinedIn, MethodInvocationMatcher.Token.Kind, MethodInvocationMatcher.Token.MethodName, MethodInvocationMatcher.Token.ParameterTypes, MethodInvocationMatcher.Token.ReceiverSupertype, MethodInvocationMatcher.Token.ReceiverType -
Constructor Summary
ConstructorsConstructorDescriptionReceiverSupertype(String receiverSupertype) Creates an instance of aReceiverSupertyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionThe value to compare withMethodInvocationMatcher.TokenType.extract(Context, VisitorState)to determine whether this property matches.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thereceiverSupertyperecord component.final StringtoString()Returns a string representation of this record class.type()The category of properties that this value falls into.
-
Constructor Details
-
ReceiverSupertype
Creates an instance of aReceiverSupertyperecord class.- Parameters:
receiverSupertype- the value for thereceiverSupertyperecord component
-
-
Method Details
-
type
Description copied from interface:MethodInvocationMatcher.TokenThe category of properties that this value falls into.- Specified by:
typein interfaceMethodInvocationMatcher.Token
-
create
-
comparisonKey
Description copied from interface:MethodInvocationMatcher.TokenThe value to compare withMethodInvocationMatcher.TokenType.extract(Context, VisitorState)to determine whether this property matches.- Specified by:
comparisonKeyin interfaceMethodInvocationMatcher.Token
-
toString
-
hashCode
-
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). -
receiverSupertype
Returns the value of thereceiverSupertyperecord component.- Returns:
- the value of the
receiverSupertyperecord component
-