org.jetbrains.kotlin.resolve.constants
Class CompileTimeConstantChecker

java.lang.Object
  extended by org.jetbrains.kotlin.resolve.constants.CompileTimeConstantChecker

public class CompileTimeConstantChecker
extends java.lang.Object


Nested Class Summary
static class CompileTimeConstantChecker.CharacterWithDiagnostic
           
 
Constructor Summary
CompileTimeConstantChecker(BindingTrace trace, boolean checkOnlyErrorsThatDependOnExpectedType)
           
 
Method Summary
 boolean checkConstantExpressionType(CompileTimeConstant compileTimeConstant, JetConstantExpression expression, JetType expectedType)
           
static CompileTimeConstantChecker.CharacterWithDiagnostic escapedStringToCharacter(java.lang.String text, JetElement expression)
           
static boolean noExpectedTypeOrError(JetType expectedType)
           
static java.lang.Character parseChar(JetConstantExpression expression)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompileTimeConstantChecker

public CompileTimeConstantChecker(@NotNull
                                  BindingTrace trace,
                                  boolean checkOnlyErrorsThatDependOnExpectedType)
Method Detail

checkConstantExpressionType

public boolean checkConstantExpressionType(@Nullable
                                           CompileTimeConstant compileTimeConstant,
                                           @NotNull
                                           JetConstantExpression expression,
                                           @NotNull
                                           JetType expectedType)

escapedStringToCharacter

@NotNull
public static CompileTimeConstantChecker.CharacterWithDiagnostic escapedStringToCharacter(@NotNull
                                                                                                  java.lang.String text,
                                                                                                  @NotNull
                                                                                                  JetElement expression)

parseChar

@Nullable
public static java.lang.Character parseChar(@NotNull
                                                     JetConstantExpression expression)

noExpectedTypeOrError

public static boolean noExpectedTypeOrError(JetType expectedType)