Record Class ComplexityData
java.lang.Object
java.lang.Record
com.github._1c_syntax.bsl.languageserver.context.computer.ComplexityData
- Record Components:
fileComplexity- Сложность всего файлаfileCodeBlockComplexity- Сложность блока кода файла (без учета сложности вложенных методов)fileBlockComplexitySecondaryLocations- Вторичные локации для блоков, увеличивающих сложность файлаmethodsComplexity- Карта сложности методов (метод -> сложность)methodsComplexitySecondaryLocations- Карта вторичных локаций для методов (метод -> список локаций)
public record ComplexityData(int fileComplexity, int fileCodeBlockComplexity, List<ComplexitySecondaryLocation> fileBlockComplexitySecondaryLocations, Map<MethodSymbol,Integer> methodsComplexity, Map<MethodSymbol,List<ComplexitySecondaryLocation>> methodsComplexitySecondaryLocations)
extends Record
Данные о сложности кода.
Содержит значения когнитивной или цикломатической сложности для файла в целом и для каждого метода отдельно.
-
Constructor Summary
ConstructorsConstructorDescriptionComplexityData(int fileComplexity, int fileCodeBlockComplexity, List<ComplexitySecondaryLocation> fileBlockComplexitySecondaryLocations, Map<MethodSymbol, Integer> methodsComplexity, Map<MethodSymbol, List<ComplexitySecondaryLocation>> methodsComplexitySecondaryLocations) Creates an instance of aComplexityDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefileBlockComplexitySecondaryLocationsrecord component.intReturns the value of thefileCodeBlockComplexityrecord component.intReturns the value of thefileComplexityrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themethodsComplexityrecord component.Returns the value of themethodsComplexitySecondaryLocationsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ComplexityData
public ComplexityData(int fileComplexity, int fileCodeBlockComplexity, List<ComplexitySecondaryLocation> fileBlockComplexitySecondaryLocations, Map<MethodSymbol, Integer> methodsComplexity, Map<MethodSymbol, List<ComplexitySecondaryLocation>> methodsComplexitySecondaryLocations) Creates an instance of aComplexityDatarecord class.- Parameters:
fileComplexity- the value for thefileComplexityrecord componentfileCodeBlockComplexity- the value for thefileCodeBlockComplexityrecord componentfileBlockComplexitySecondaryLocations- the value for thefileBlockComplexitySecondaryLocationsrecord componentmethodsComplexity- the value for themethodsComplexityrecord componentmethodsComplexitySecondaryLocations- the value for themethodsComplexitySecondaryLocationsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
fileComplexity
public int fileComplexity()Returns the value of thefileComplexityrecord component.- Returns:
- the value of the
fileComplexityrecord component
-
fileCodeBlockComplexity
public int fileCodeBlockComplexity()Returns the value of thefileCodeBlockComplexityrecord component.- Returns:
- the value of the
fileCodeBlockComplexityrecord component
-
fileBlockComplexitySecondaryLocations
Returns the value of thefileBlockComplexitySecondaryLocationsrecord component.- Returns:
- the value of the
fileBlockComplexitySecondaryLocationsrecord component
-
methodsComplexity
Returns the value of themethodsComplexityrecord component.- Returns:
- the value of the
methodsComplexityrecord component
-
methodsComplexitySecondaryLocations
Returns the value of themethodsComplexitySecondaryLocationsrecord component.- Returns:
- the value of the
methodsComplexitySecondaryLocationsrecord component
-