Record Class LocalVarBinding
java.lang.Object
java.lang.Record
com.google.errorprone.refaster.LocalVarBinding
public record LocalVarBinding(com.sun.tools.javac.code.Symbol.VarSymbol symbol, ModifiersTree modifiers)
extends Record
Binding for a local variable in a template.
- Author:
- lowasser@google.com (Louis Wasserman)
-
Constructor Summary
ConstructorsConstructorDescriptionLocalVarBinding(com.sun.tools.javac.code.Symbol.VarSymbol symbol, ModifiersTree modifiers) Creates an instance of aLocalVarBindingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalVarBindingcreate(com.sun.tools.javac.code.Symbol.VarSymbol symbol, ModifiersTree modifiers) final booleanIndicates whether some other object is "equal to" this one.com.sun.tools.javac.util.NamegetName()final inthashCode()Returns a hash code value for this object.Returns the value of themodifiersrecord component.com.sun.tools.javac.code.Symbol.VarSymbolsymbol()Returns the value of thesymbolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LocalVarBinding
Creates an instance of aLocalVarBindingrecord class.- Parameters:
symbol- the value for thesymbolrecord componentmodifiers- the value for themodifiersrecord component
-
-
Method Details
-
create
public static LocalVarBinding create(com.sun.tools.javac.code.Symbol.VarSymbol symbol, ModifiersTree modifiers) -
getName
public com.sun.tools.javac.util.Name getName() -
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). -
symbol
public com.sun.tools.javac.code.Symbol.VarSymbol symbol()Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
modifiers
Returns the value of themodifiersrecord component.- Returns:
- the value of the
modifiersrecord component
-