Package org.sonar.python.semantic
Class SymbolUtils
- java.lang.Object
-
- org.sonar.python.semantic.SymbolUtils
-
public class SymbolUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Expression>assignmentsLhs(AssignmentStatement assignmentStatement)static intfirstParameterOffset(FunctionSymbol functionSymbol, boolean isStaticCall)static StringfullyQualifiedModuleName(String packageName, String fileName)static StringgetModuleFileName(String fileName)static Optional<FunctionSymbol>getOverriddenMethod(FunctionSymbol functionSymbol)static booleanisTypeShedFile(PythonFile pythonFile)static PathpathOf(PythonFile pythonFile)static StringpythonPackageName(File file, String projectBaseDirAbsolutePath)
-
-
-
Method Detail
-
fullyQualifiedModuleName
public static String fullyQualifiedModuleName(String packageName, String fileName)
-
assignmentsLhs
public static List<Expression> assignmentsLhs(AssignmentStatement assignmentStatement)
-
pythonPackageName
public static String pythonPackageName(File file, String projectBaseDirAbsolutePath)
-
pathOf
@CheckForNull public static Path pathOf(PythonFile pythonFile)
-
isTypeShedFile
public static boolean isTypeShedFile(PythonFile pythonFile)
-
firstParameterOffset
public static int firstParameterOffset(FunctionSymbol functionSymbol, boolean isStaticCall)
- Returns:
- the offset between parameter position and argument position: 0 if there is no implicit first parameter (self, cls, etc...) 1 if there is an implicit first parameter -1 if unknown (intent is not clear from context)
-
getOverriddenMethod
public static Optional<FunctionSymbol> getOverriddenMethod(FunctionSymbol functionSymbol)
-
-