org.jetbrains.kotlin.codegen.when
Class StringSwitchCodegen

java.lang.Object
  extended by org.jetbrains.kotlin.codegen.when.SwitchCodegen
      extended by org.jetbrains.kotlin.codegen.when.StringSwitchCodegen

public class StringSwitchCodegen
extends SwitchCodegen


Field Summary
 
Fields inherited from class org.jetbrains.kotlin.codegen.when.SwitchCodegen
bindingContext, codegen, defaultLabel, elseLabel, endLabel, entryLabels, expression, isStatement, resultType, subjectType, transitionsTable, v
 
Constructor Summary
StringSwitchCodegen(JetWhenExpression expression, boolean isStatement, ExpressionCodegen codegen)
           
 
Method Summary
 void generate()
          Generates bytecode for entire when expression
protected  void generateEntries()
           
protected  void generateSubject()
          Should generate int subject on top of the stack Default implementation just run codegen for actual subject of expression May also gen nullability check if needed
protected  void processConstant(CompileTimeConstant constant, org.jetbrains.org.objectweb.asm.Label entryLabel)
           
 
Methods inherited from class org.jetbrains.kotlin.codegen.when.SwitchCodegen
generateNullCheckIfNeeded, putTransitionOnce
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSwitchCodegen

public StringSwitchCodegen(@NotNull
                           JetWhenExpression expression,
                           boolean isStatement,
                           @NotNull
                           ExpressionCodegen codegen)
Method Detail

processConstant

protected void processConstant(@NotNull
                               CompileTimeConstant constant,
                               @NotNull
                               org.jetbrains.org.objectweb.asm.Label entryLabel)
Specified by:
processConstant in class SwitchCodegen

generate

public void generate()
Description copied from class: SwitchCodegen
Generates bytecode for entire when expression

Overrides:
generate in class SwitchCodegen

generateSubject

protected void generateSubject()
Description copied from class: SwitchCodegen
Should generate int subject on top of the stack Default implementation just run codegen for actual subject of expression May also gen nullability check if needed

Overrides:
generateSubject in class SwitchCodegen

generateEntries

protected void generateEntries()
Overrides:
generateEntries in class SwitchCodegen