Package org.sonar.python.types
Class InferredTypes
- java.lang.Object
-
- org.sonar.python.types.InferredTypes
-
public class InferredTypes extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static InferredTypeBOOLstatic InferredTypeCOMPLEXstatic InferredTypeDECL_BOOLstatic InferredTypeDECL_COMPLEXstatic InferredTypeDECL_DICTstatic InferredTypeDECL_FLOATstatic InferredTypeDECL_INTstatic InferredTypeDECL_LISTstatic InferredTypeDECL_NONEstatic InferredTypeDECL_SETstatic InferredTypeDECL_STRstatic InferredTypeDECL_TUPLEstatic InferredTypeDICTstatic InferredTypeFLOATstatic InferredTypeINTstatic InferredTypeLISTstatic InferredTypeNONEstatic InferredTypeSETstatic InferredTypeSTRstatic InferredTypeTUPLE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InferredTypeanyType()static booleancontainsDeclaredType(InferredType type)static InferredTypefromTypeAnnotation(TypeAnnotation typeAnnotation)static InferredTypefromTypeshedProtobuf(SymbolsProtos.Type type)static InferredTypefromTypeshedTypeAnnotation(TypeAnnotation typeAnnotation)static booleanisDeclaredTypeWithTypeClass(InferredType type, String typeName)static InferredTypeor(InferredType t1, InferredType t2)static InferredTyperuntimeType(Symbol typeClass)static LocationInFiletypeClassLocation(InferredType inferredType)static StringtypeName(InferredType inferredType)static Collection<ClassSymbol>typeSymbols(InferredType inferredType)static InferredTypeunion(Stream<InferredType> types)
-
-
-
Field Detail
-
INT
public static final InferredType INT
-
DECL_INT
public static final InferredType DECL_INT
-
FLOAT
public static final InferredType FLOAT
-
DECL_FLOAT
public static final InferredType DECL_FLOAT
-
COMPLEX
public static final InferredType COMPLEX
-
DECL_COMPLEX
public static final InferredType DECL_COMPLEX
-
STR
public static final InferredType STR
-
DECL_STR
public static final InferredType DECL_STR
-
SET
public static final InferredType SET
-
DECL_SET
public static final InferredType DECL_SET
-
DICT
public static final InferredType DICT
-
DECL_DICT
public static final InferredType DECL_DICT
-
LIST
public static final InferredType LIST
-
DECL_LIST
public static final InferredType DECL_LIST
-
TUPLE
public static final InferredType TUPLE
-
DECL_TUPLE
public static final InferredType DECL_TUPLE
-
NONE
public static final InferredType NONE
-
DECL_NONE
public static final InferredType DECL_NONE
-
BOOL
public static final InferredType BOOL
-
DECL_BOOL
public static final InferredType DECL_BOOL
-
-
Method Detail
-
anyType
public static InferredType anyType()
-
runtimeType
public static InferredType runtimeType(@Nullable Symbol typeClass)
-
or
public static InferredType or(InferredType t1, InferredType t2)
-
union
public static InferredType union(Stream<InferredType> types)
-
fromTypeAnnotation
public static InferredType fromTypeAnnotation(TypeAnnotation typeAnnotation)
-
fromTypeshedTypeAnnotation
public static InferredType fromTypeshedTypeAnnotation(TypeAnnotation typeAnnotation)
-
fromTypeshedProtobuf
public static InferredType fromTypeshedProtobuf(SymbolsProtos.Type type)
-
typeSymbols
public static Collection<ClassSymbol> typeSymbols(InferredType inferredType)
-
typeName
@CheckForNull public static String typeName(InferredType inferredType)
-
typeClassLocation
@CheckForNull public static LocationInFile typeClassLocation(InferredType inferredType)
-
isDeclaredTypeWithTypeClass
public static boolean isDeclaredTypeWithTypeClass(InferredType type, String typeName)
-
containsDeclaredType
public static boolean containsDeclaredType(InferredType type)
-
-