Record Class Scanner.TextFragment
java.lang.Object
java.lang.Record
org.aspectj.org.eclipse.jdt.internal.compiler.parser.Scanner.TextFragment
- All Implemented Interfaces:
Scanner.IStringTemplateComponent
- Enclosing class:
Scanner
public static record Scanner.TextFragment(int start, int end, char[] text)
extends Record
implements Scanner.IStringTemplateComponent
-
Constructor Summary
ConstructorsConstructorDescriptionTextFragment(int start, int end, char[] text) Creates an instance of aTextFragmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intstart()Returns the value of thestartrecord component.char[]text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextFragment
public TextFragment(int start, int end, char[] text) Creates an instance of aTextFragmentrecord class.- Parameters:
start- the value for thestartrecord componentend- the value for theendrecord componenttext- the value for thetextrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
start
public int start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
public int end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
text
public char[] text()Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-