org.jetbrains.jet.lang.resolve.constants
Class CompileTimeConstantResolver

java.lang.Object
  extended by org.jetbrains.jet.lang.resolve.constants.CompileTimeConstantResolver

public class CompileTimeConstantResolver
extends java.lang.Object


Field Summary
static ErrorValue OUT_OF_RANGE
           
 
Constructor Summary
CompileTimeConstantResolver()
           
 
Method Summary
static CompileTimeConstant<?> escapedStringToCharValue(java.lang.String text)
           
 CompileTimeConstant<?> getBooleanValue(java.lang.String text, JetType expectedType)
           
 CompileTimeConstant<?> getCharValue(java.lang.String text, JetType expectedType)
           
 CompileTimeConstant<?> getCompileTimeConstant(JetConstantExpression expression, JetType expectedType)
           
 CompileTimeConstant<?> getEscapedStringValue(java.util.List<JetStringTemplateEntry> entries, JetType expectedType)
           
 CompileTimeConstant<?> getFloatValue(java.lang.String text, JetType expectedType)
           
 CompileTimeConstant<?> getIntegerValue(java.lang.Long value, JetType expectedType)
           
 CompileTimeConstant<?> getIntegerValue(java.lang.String text, JetType expectedType)
           
 CompileTimeConstant<?> getNullValue(JetType expectedType)
           
 CompileTimeConstant<?> getRawStringValue(java.lang.String unescapedText, JetType expectedType)
           
static java.lang.Double parseDoubleValue(java.lang.String text)
           
static java.lang.Long parseLongValue(java.lang.String text)
           
static java.lang.Character translateEscape(char c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUT_OF_RANGE

public static final ErrorValue OUT_OF_RANGE
Constructor Detail

CompileTimeConstantResolver

public CompileTimeConstantResolver()
Method Detail

getCompileTimeConstant

@NotNull
public CompileTimeConstant<?> getCompileTimeConstant(@NotNull
                                                             JetConstantExpression expression,
                                                             @NotNull
                                                             JetType expectedType)

getIntegerValue

@NotNull
public CompileTimeConstant<?> getIntegerValue(@NotNull
                                                      java.lang.String text,
                                                      @NotNull
                                                      JetType expectedType)

getIntegerValue

@NotNull
public CompileTimeConstant<?> getIntegerValue(@Nullable
                                                      java.lang.Long value,
                                                      @NotNull
                                                      JetType expectedType)

parseLongValue

@Nullable
public static java.lang.Long parseLongValue(java.lang.String text)

parseDoubleValue

@Nullable
public static java.lang.Double parseDoubleValue(java.lang.String text)

getFloatValue

@NotNull
public CompileTimeConstant<?> getFloatValue(@NotNull
                                                    java.lang.String text,
                                                    @NotNull
                                                    JetType expectedType)

getBooleanValue

@NotNull
public CompileTimeConstant<?> getBooleanValue(@NotNull
                                                      java.lang.String text,
                                                      @NotNull
                                                      JetType expectedType)

getCharValue

@NotNull
public CompileTimeConstant<?> getCharValue(@NotNull
                                                   java.lang.String text,
                                                   @NotNull
                                                   JetType expectedType)

escapedStringToCharValue

@NotNull
public static CompileTimeConstant<?> escapedStringToCharValue(@NotNull
                                                                      java.lang.String text)

translateEscape

@Nullable
public static java.lang.Character translateEscape(char c)

getRawStringValue

@NotNull
public CompileTimeConstant<?> getRawStringValue(@NotNull
                                                        java.lang.String unescapedText,
                                                        @NotNull
                                                        JetType expectedType)

getEscapedStringValue

@NotNull
public CompileTimeConstant<?> getEscapedStringValue(@NotNull
                                                            java.util.List<JetStringTemplateEntry> entries,
                                                            @NotNull
                                                            JetType expectedType)

getNullValue

@NotNull
public CompileTimeConstant<?> getNullValue(@NotNull
                                                   JetType expectedType)