Record Class ConstructorMatchState
java.lang.Object
java.lang.Record
com.google.errorprone.matchers.method.ConstructorMatchState
- Record Components:
sym- The method being matched.
- All Implemented Interfaces:
MatchState
public record ConstructorMatchState(com.sun.tools.javac.code.Symbol.MethodSymbol sym)
extends Record
implements MatchState
The state that is propagated across a match operation for constructors.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorMatchState(com.sun.tools.javac.code.Symbol.MethodSymbol sym) Creates an instance of aConstructorMatchStaterecord 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.com.sun.tools.javac.code.TypeThe type of the class in which a member method or constructor is declared.com.sun.tools.javac.code.Symbol.MethodSymbolsym()Returns the value of thesymrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface MatchState
paramTypes
-
Constructor Details
-
ConstructorMatchState
public ConstructorMatchState(com.sun.tools.javac.code.Symbol.MethodSymbol sym) Creates an instance of aConstructorMatchStaterecord class.- Parameters:
sym- the value for thesymrecord component
-
-
Method Details
-
ownerType
public com.sun.tools.javac.code.Type ownerType()The type of the class in which a member method or constructor is declared.- Specified by:
ownerTypein interfaceMatchState
-
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). -
sym
public com.sun.tools.javac.code.Symbol.MethodSymbol sym()Returns the value of thesymrecord component.- Specified by:
symin interfaceMatchState- Returns:
- the value of the
symrecord component
-