org.jetbrains.jet.codegen
Class MemberCodegen<T extends JetElement>

java.lang.Object
  extended by org.jetbrains.jet.codegen.ParentCodegenAware
      extended by org.jetbrains.jet.codegen.MemberCodegen<T>
Direct Known Subclasses:
ClassBodyCodegen, PackagePartCodegen, ScriptCodegen

public abstract class MemberCodegen<T extends JetElement>
extends ParentCodegenAware


Field Summary
protected  ExpressionCodegen clInit
           
protected  FieldOwnerContext context
           
protected  T element
           
protected  FunctionCodegen functionCodegen
           
protected  PropertyCodegen propertyCodegen
           
protected  ClassBuilder v
           
 
Fields inherited from class org.jetbrains.jet.codegen.ParentCodegenAware
bindingContext, state, typeMapper
 
Constructor Summary
MemberCodegen(GenerationState state, MemberCodegen<?> parentCodegen, FieldOwnerContext context, T element, ClassBuilder builder)
           
 
Method Summary
protected  ExpressionCodegen createOrGetClInitCodegen()
           
static void genClassOrObject(CodegenContext parentContext, JetClassOrObject aClass, GenerationState state, MemberCodegen<?> parentCodegen)
           
 void genClassOrObject(JetClassOrObject aClass)
           
 void generate()
           
protected abstract  void generateBody()
           
protected abstract  void generateDeclaration()
           
protected  void generateInitializers(kotlin.Function0<ExpressionCodegen> createCodegen)
           
protected abstract  void generateKotlinAnnotation()
           
protected  void generatePropertyMetadataArrayFieldIfNeeded(org.jetbrains.org.objectweb.asm.Type thisAsmType)
           
protected  void generateSyntheticParts()
           
 void genFunctionOrProperty(JetDeclaration functionOrProperty)
           
 java.lang.String getClassName()
           
 NameGenerator getInlineNameGenerator()
           
 
Methods inherited from class org.jetbrains.jet.codegen.ParentCodegenAware
getParentCodegen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected final T extends JetElement element

context

protected final FieldOwnerContext context

v

protected final ClassBuilder v

functionCodegen

protected final FunctionCodegen functionCodegen

propertyCodegen

protected final PropertyCodegen propertyCodegen

clInit

protected ExpressionCodegen clInit
Constructor Detail

MemberCodegen

public MemberCodegen(@NotNull
                     GenerationState state,
                     @Nullable
                     MemberCodegen<?> parentCodegen,
                     @NotNull
                     FieldOwnerContext context,
                     T element,
                     @NotNull
                     ClassBuilder builder)
Method Detail

generate

public void generate()

generateDeclaration

protected abstract void generateDeclaration()

generateBody

protected abstract void generateBody()

generateSyntheticParts

protected void generateSyntheticParts()

generateKotlinAnnotation

protected abstract void generateKotlinAnnotation()

genFunctionOrProperty

public void genFunctionOrProperty(@NotNull
                                  JetDeclaration functionOrProperty)

genClassOrObject

public static void genClassOrObject(@NotNull
                                    CodegenContext parentContext,
                                    @NotNull
                                    JetClassOrObject aClass,
                                    @NotNull
                                    GenerationState state,
                                    @Nullable
                                    MemberCodegen<?> parentCodegen)

genClassOrObject

public void genClassOrObject(JetClassOrObject aClass)

getInlineNameGenerator

@NotNull
public NameGenerator getInlineNameGenerator()

createOrGetClInitCodegen

@NotNull
protected ExpressionCodegen createOrGetClInitCodegen()

generateInitializers

protected void generateInitializers(@NotNull
                                    kotlin.Function0<ExpressionCodegen> createCodegen)

generatePropertyMetadataArrayFieldIfNeeded

protected void generatePropertyMetadataArrayFieldIfNeeded(@NotNull
                                                          org.jetbrains.org.objectweb.asm.Type thisAsmType)

getClassName

public java.lang.String getClassName()