Record Class AbstractCollectionIncompatibleTypeMatcher.MatchResult
java.lang.Object
java.lang.Record
com.google.errorprone.bugpatterns.collectionincompatibletype.AbstractCollectionIncompatibleTypeMatcher.MatchResult
- Enclosing class:
AbstractCollectionIncompatibleTypeMatcher
public static record AbstractCollectionIncompatibleTypeMatcher.MatchResult(ExpressionTree sourceTree, com.sun.tools.javac.code.Type sourceType, com.sun.tools.javac.code.Type targetType, AbstractCollectionIncompatibleTypeMatcher matcher)
extends Record
Encapsulates the result of matching a
Collection.contains(Object)-like call, including the
source and target types.-
Constructor Summary
ConstructorsConstructorDescriptionMatchResult(ExpressionTree sourceTree, com.sun.tools.javac.code.Type sourceType, com.sun.tools.javac.code.Type targetType, AbstractCollectionIncompatibleTypeMatcher matcher) Creates an instance of aMatchResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuildFix()create(ExpressionTree sourceTree, com.sun.tools.javac.code.Type sourceType, com.sun.tools.javac.code.Type targetType, AbstractCollectionIncompatibleTypeMatcher matcher) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.matcher()Returns the value of thematcherrecord component.Returns the value of thesourceTreerecord component.com.sun.tools.javac.code.TypeReturns the value of thesourceTyperecord component.com.sun.tools.javac.code.TypeReturns the value of thetargetTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MatchResult
public MatchResult(ExpressionTree sourceTree, com.sun.tools.javac.code.Type sourceType, com.sun.tools.javac.code.Type targetType, AbstractCollectionIncompatibleTypeMatcher matcher) Creates an instance of aMatchResultrecord class.- Parameters:
sourceTree- the value for thesourceTreerecord componentsourceType- the value for thesourceTyperecord componenttargetType- the value for thetargetTyperecord componentmatcher- the value for thematcherrecord component
-
-
Method Details
-
create
public static AbstractCollectionIncompatibleTypeMatcher.MatchResult create(ExpressionTree sourceTree, com.sun.tools.javac.code.Type sourceType, com.sun.tools.javac.code.Type targetType, AbstractCollectionIncompatibleTypeMatcher matcher) -
message
-
buildFix
-
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). -
sourceTree
Returns the value of thesourceTreerecord component.- Returns:
- the value of the
sourceTreerecord component
-
sourceType
public com.sun.tools.javac.code.Type sourceType()Returns the value of thesourceTyperecord component.- Returns:
- the value of the
sourceTyperecord component
-
targetType
public com.sun.tools.javac.code.Type targetType()Returns the value of thetargetTyperecord component.- Returns:
- the value of the
targetTyperecord component
-
matcher
Returns the value of thematcherrecord component.- Returns:
- the value of the
matcherrecord component
-