Record Class CfgBuildOptions
java.lang.Object
java.lang.Record
com.github._1c_syntax.bsl.languageserver.cfg.CfgBuildOptions
- Record Components:
loopIterations- строить рёбра повторной итерации циклов (CfgEdgeType.LOOP_ITERATION).preprocessorConditions- строить вершины условий препроцессора (PreprocessorConditionVertex).adjacentDeadCode- помечать рёбрамиCfgEdgeType.ADJACENT_CODEкод, идущий следом за недостижимым.
public record CfgBuildOptions(boolean loopIterations, boolean preprocessorConditions, boolean adjacentDeadCode)
extends Record
Набор настроек построения графа потока управления.
Значение неизменяемое и пригодно как часть ключа кэша: графы, построенные с разными настройками, различаются по структуре и не взаимозаменяемы.
Собранный отсюда построитель получает все три настройки явно, поэтому набор задаёт
структуру графа целиком, независимо от умолчаний CfgBuildingParseTreeVisitor.
-
Constructor Summary
ConstructorsConstructorDescriptionCfgBuildOptions(boolean loopIterations, boolean preprocessorConditions, boolean adjacentDeadCode) Creates an instance of aCfgBuildOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theadjacentDeadCoderecord component.static CfgBuildOptionsdefaults()Настройки по умолчанию: рёбра итераций циклов и условия препроцессора строятся, соседний с недостижимым код не помечается.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theloopIterationsrecord component.booleanReturns the value of thepreprocessorConditionsrecord component.final StringtoString()Returns a string representation of this record class.withAdjacentDeadCode(boolean enable) Копия набора с изменённой пометкой кода, соседнего с недостижимым.withLoopIterations(boolean enable) Копия набора с изменённым построением рёбер повторной итерации циклов.withPreprocessorConditions(boolean enable) Копия набора с изменённым построением вершин условий препроцессора.
-
Constructor Details
-
CfgBuildOptions
public CfgBuildOptions(boolean loopIterations, boolean preprocessorConditions, boolean adjacentDeadCode) Creates an instance of aCfgBuildOptionsrecord class.- Parameters:
loopIterations- the value for theloopIterationsrecord componentpreprocessorConditions- the value for thepreprocessorConditionsrecord componentadjacentDeadCode- the value for theadjacentDeadCoderecord component
-
-
Method Details
-
defaults
Настройки по умолчанию: рёбра итераций циклов и условия препроцессора строятся, соседний с недостижимым код не помечается.- Returns:
- набор настроек по умолчанию.
-
withLoopIterations
Копия набора с изменённым построением рёбер повторной итерации циклов.- Parameters:
enable- строить ли рёбра повторной итерации.- Returns:
- новый набор настроек.
-
withPreprocessorConditions
Копия набора с изменённым построением вершин условий препроцессора.- Parameters:
enable- строить ли вершины условий препроцессора.- Returns:
- новый набор настроек.
-
withAdjacentDeadCode
Копия набора с изменённой пометкой кода, соседнего с недостижимым.- Parameters:
enable- помечать ли соседний код.- Returns:
- новый набор настроек.
-
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 with thecomparemethod from their corresponding wrapper classes. -
loopIterations
public boolean loopIterations()Returns the value of theloopIterationsrecord component.- Returns:
- the value of the
loopIterationsrecord component
-
preprocessorConditions
public boolean preprocessorConditions()Returns the value of thepreprocessorConditionsrecord component.- Returns:
- the value of the
preprocessorConditionsrecord component
-
adjacentDeadCode
public boolean adjacentDeadCode()Returns the value of theadjacentDeadCoderecord component.- Returns:
- the value of the
adjacentDeadCoderecord component
-