Class AnnotatedVariableSymbol
java.lang.Object
com.github._1c_syntax.bsl.languageserver.context.symbol.AbstractVariableSymbol
com.github._1c_syntax.bsl.languageserver.context.symbol.IntBasedVariableSymbol
com.github._1c_syntax.bsl.languageserver.context.symbol.AnnotatedVariableSymbol
- All Implemented Interfaces:
Describable, Exportable, SourceDefinedSymbol, Symbol, VariableSymbol, Comparable<VariableSymbol>
Реализация символа переменной, дополнительно хранящая аннотации объявления.
Создаётся AbstractVariableSymbol.Builder только когда у переменной
реально есть аннотации (переменные уровня модуля во фреймворке ОСень). Для
остальных переменных используется ShortBasedVariableSymbol /
IntBasedVariableSymbol без лишней ссылки в layout объекта.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractVariableSymbol
AbstractVariableSymbol.Builder -
Field Summary
Fields inherited from interface VariableSymbol
NATURAL_ORDER -
Constructor Summary
ConstructorsConstructorDescriptionAnnotatedVariableSymbol(String name, SourceDefinedSymbol scope, DocumentContext owner, Optional<SourceDefinedSymbol> parent, byte kind, boolean export, Optional<VariableDescription> description, int startLine, int startCharacter, int endLine, int endCharacter, int variableNameLine, int variableNameStartCharacter, int variableNameEndCharacter, List<Annotation> annotations) -
Method Summary
Methods inherited from class IntBasedVariableSymbol
getRange, getVariableNameEndCharacter, getVariableNameLine, getVariableNameRange, getVariableNameStartCharacterMethods 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
-
Constructor Details
-
AnnotatedVariableSymbol
public AnnotatedVariableSymbol(String name, SourceDefinedSymbol scope, DocumentContext owner, Optional<SourceDefinedSymbol> parent, byte kind, boolean export, Optional<VariableDescription> description, int startLine, int startCharacter, int endLine, int endCharacter, int variableNameLine, int variableNameStartCharacter, int variableNameEndCharacter, List<Annotation> annotations)
-
-
Method Details
-
toString
- Overrides:
toStringin classIntBasedVariableSymbol
-
equals
- Overrides:
equalsin classIntBasedVariableSymbol
-
canEqual
- Overrides:
canEqualin classIntBasedVariableSymbol
-
hashCode
public int hashCode()- Overrides:
hashCodein classIntBasedVariableSymbol
-
getAnnotations
Description copied from interface:VariableSymbolАннотации, навешанные на объявление переменной (например,&Пластилинфреймворка ОСень). Для подавляющего большинства переменных список пуст, поэтому он не хранится в объекте символа — см.AnnotatedVariableSymbol.- Returns:
- список аннотаций; пустой, если их нет.
-