Class IntBasedVariableSymbol
java.lang.Object
com.github._1c_syntax.bsl.languageserver.context.symbol.AbstractVariableSymbol
com.github._1c_syntax.bsl.languageserver.context.symbol.IntBasedVariableSymbol
- All Implemented Interfaces:
Describable, Exportable, SourceDefinedSymbol, Symbol, VariableSymbol, Comparable<VariableSymbol>
- Direct Known Subclasses:
DescribedVariableSymbol
Реализация символа переменной, хранящая позицию в виде int.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractVariableSymbol
AbstractVariableSymbol.Builder -
Field Summary
Fields inherited from interface VariableSymbol
NATURAL_ORDER -
Constructor Summary
ConstructorsConstructorDescriptionIntBasedVariableSymbol(String name, SourceDefinedSymbol scope, Optional<SourceDefinedSymbol> parent, byte kind, boolean export, int startLine, int startCharacter, int endLine, int endCharacter, int variableNameLine, int variableNameStartCharacter, int variableNameEndCharacter) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleancontainsPosition(Position position) Накрывает ли диапазон символа позицию — ответ как уRanges.containsPosition(getRange(), position).booleangetRange()intКонечный символ имени переменной в строке объявления.intСтрока, в которой определено имя переменной.intНачальный символ имени переменной в строке объявления.inthashCode()toString()Methods inherited from class AbstractVariableSymbol
accept, builder, getChildren, getDescription, getKind, getName, getOwner, getParent, getScope, getSelectionRange, getSymbolKind, isExport, setParentMethods inherited from interface Describable
getSymbolDescriptionMethods inherited from interface SourceDefinedSymbol
getRootParent, getRootParentMethods inherited from interface Symbol
getTags, isDeprecatedMethods inherited from interface VariableSymbol
compareTo, getAnnotations
-
Constructor Details
-
IntBasedVariableSymbol
public IntBasedVariableSymbol(String name, SourceDefinedSymbol scope, Optional<SourceDefinedSymbol> parent, byte kind, boolean export, int startLine, int startCharacter, int endLine, int endCharacter, int variableNameLine, int variableNameStartCharacter, int variableNameEndCharacter)
-
-
Method Details
-
getRange
- Returns:
- Диапазон, который захватывает символ.
-
getVariableNameRange
- Returns:
- Диапазон, в котором определено имя переменной.
-
containsPosition
Description copied from interface:SourceDefinedSymbolНакрывает ли диапазон символа позицию — ответ как уRanges.containsPosition(getRange(), position). Символы, которые хранят диапазон числами, отвечают без создания диапазона.- Parameters:
position- позиция в документе.- Returns:
true, если позиция в диапазоне символа (включая начало, исключая конец).
-
getVariableNameLine
public int getVariableNameLine()Description copied from interface:VariableSymbolСтрока, в которой определено имя переменной.- Returns:
- номер строки имени переменной.
-
getVariableNameStartCharacter
public int getVariableNameStartCharacter()Description copied from interface:VariableSymbolНачальный символ имени переменной в строке объявления.- Returns:
- номер начального символа имени переменной.
-
getVariableNameEndCharacter
public int getVariableNameEndCharacter()Description copied from interface:VariableSymbolКонечный символ имени переменной в строке объявления.- Returns:
- номер конечного символа имени переменной.
-
toString
- Overrides:
toStringin classAbstractVariableSymbol
-
equals
- Overrides:
equalsin classAbstractVariableSymbol
-
canEqual
- Overrides:
canEqualin classAbstractVariableSymbol
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractVariableSymbol
-