Record Class MethodInvocationMatcher.Token.ReceiverType
java.lang.Object
java.lang.Record
com.google.errorprone.matchers.method.MethodInvocationMatcher.Token.ReceiverType
- All Implemented Interfaces:
MethodInvocationMatcher.Token
- Enclosing interface:
MethodInvocationMatcher.Token
public static record MethodInvocationMatcher.Token.ReceiverType(String receiverType)
extends Record
implements MethodInvocationMatcher.Token
A token specifying the exact type of the object on which the method is being invoked (or the
class in which it is defined, for static methods).
-
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
ConstructorsConstructorDescriptionReceiverType(String receiverType) Creates an instance of aReceiverTyperecord 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 thereceiverTyperecord component.final StringtoString()Returns a string representation of this record class.type()The category of properties that this value falls into.
-
Constructor Details
-
ReceiverType
Creates an instance of aReceiverTyperecord class.- Parameters:
receiverType- the value for thereceiverTyperecord component
-
-
Method Details
-
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
-
type
Description copied from interface:MethodInvocationMatcher.TokenThe category of properties that this value falls into.- Specified by:
typein 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). -
receiverType
Returns the value of thereceiverTyperecord component.- Returns:
- the value of the
receiverTyperecord component
-