public class DfaValueFactory
extends java.lang.Object
Constructor and Description |
---|
DfaValueFactory(Project project,
PsiElement context,
boolean unknownMembersAreNullable) |
public DfaValueFactory(Project project, PsiElement context, boolean unknownMembersAreNullable)
project
- a project in which context the analysis is performedcontext
- an item to analyze (code-block, expression, class)unknownMembersAreNullable
- public boolean canTrustFieldInitializer(PsiField field)
public Nullability suggestNullabilityForNonAnnotatedMember(PsiModifierListOwner member)
public DfaTypeValue getObjectType(PsiType type, Nullability nullability)
public DfaValue getValue(int id)
public DfaValue createValue(PsiExpression psiExpression)
public DfaTypeValue getInt(int value)
public DfaTypeValue getUnknown()
public DfaValue getSentinel()
public DfaTypeValue getBoolean(boolean value)
public DfaTypeValue getNull()
public DfaTypeValue getConstant(java.lang.Object value, PsiType type)
PsiEnumConstant
(enum constant value, type must be the corresponding enum type)PsiField
(a final field that contains a unique value, type must be a type of that field)PsiType
(java.lang.Class object value, type must be java.lang.Class)type
- type of the constantpublic DfaValue getConstantFromVariable(PsiVariable variable)
variable
- variable to create a constant based on its valuepublic Project getProject()
public DfaTypeValue fromDfType(DfType dfType)
public java.util.Collection<DfaValue> getValues()
public DfaControlTransferValue controlTransfer(TransferTarget kind, FList<Trap> traps)
public DfaVariableValue.Factory getVarFactory()
public DfaBoxedValue.Factory getBoxedFactory()
public DfaExpressionFactory getExpressionFactory()
public DfaBinOpValue.Factory getBinOpFactory()
public DfaValue createCommonValue(PsiExpression [] expressions, PsiType targetType)