org.jetbrains.k2js.translate.reference
Class PropertyAccessTranslator

java.lang.Object
  extended by org.jetbrains.k2js.translate.general.AbstractTranslator
      extended by org.jetbrains.k2js.translate.reference.PropertyAccessTranslator
All Implemented Interfaces:
AccessTranslator
Direct Known Subclasses:
KotlinPropertyAccessTranslator, NativePropertyAccessTranslator

public abstract class PropertyAccessTranslator
extends AbstractTranslator
implements AccessTranslator


Constructor Summary
protected PropertyAccessTranslator(TranslationContext context)
           
 
Method Summary
static boolean canBePropertyAccess(JetExpression expression, TranslationContext context)
           
static boolean canBePropertyGetterCall(JetExpression expression, TranslationContext context)
           
protected  CallType getCallType()
           
static PropertyAccessTranslator newInstance(JetSimpleNameExpression expression, com.google.dart.compiler.backend.js.ast.JsExpression qualifier, CallType callType, TranslationContext context)
           
 void setCallType(CallType callType)
           
protected abstract  com.google.dart.compiler.backend.js.ast.JsExpression translateAsGet(com.google.dart.compiler.backend.js.ast.JsExpression receiver)
           
static com.google.dart.compiler.backend.js.ast.JsExpression translateAsPropertyGetterCall(JetSimpleNameExpression expression, com.google.dart.compiler.backend.js.ast.JsExpression qualifier, CallType callType, TranslationContext context)
           
protected abstract  com.google.dart.compiler.backend.js.ast.JsExpression translateAsSet(com.google.dart.compiler.backend.js.ast.JsExpression receiver, com.google.dart.compiler.backend.js.ast.JsExpression setTo)
           
 
Methods inherited from class org.jetbrains.k2js.translate.general.AbstractTranslator
bindingContext, context, program
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jetbrains.k2js.translate.reference.AccessTranslator
getCached, translateAsGet, translateAsSet
 

Constructor Detail

PropertyAccessTranslator

protected PropertyAccessTranslator(@NotNull
                                   TranslationContext context)
Method Detail

newInstance

@NotNull
public static PropertyAccessTranslator newInstance(@NotNull
                                                           JetSimpleNameExpression expression,
                                                           @Nullable
                                                           com.google.dart.compiler.backend.js.ast.JsExpression qualifier,
                                                           @NotNull
                                                           CallType callType,
                                                           @NotNull
                                                           TranslationContext context)

translateAsPropertyGetterCall

@NotNull
public static com.google.dart.compiler.backend.js.ast.JsExpression translateAsPropertyGetterCall(@NotNull
                                                                                                         JetSimpleNameExpression expression,
                                                                                                         @Nullable
                                                                                                         com.google.dart.compiler.backend.js.ast.JsExpression qualifier,
                                                                                                         @NotNull
                                                                                                         CallType callType,
                                                                                                         @NotNull
                                                                                                         TranslationContext context)

canBePropertyGetterCall

public static boolean canBePropertyGetterCall(@NotNull
                                              JetExpression expression,
                                              @NotNull
                                              TranslationContext context)

canBePropertyAccess

public static boolean canBePropertyAccess(@NotNull
                                          JetExpression expression,
                                          @NotNull
                                          TranslationContext context)

setCallType

public void setCallType(@NotNull
                        CallType callType)

getCallType

@NotNull
protected CallType getCallType()

translateAsGet

@NotNull
protected abstract com.google.dart.compiler.backend.js.ast.JsExpression translateAsGet(@Nullable
                                                                                               com.google.dart.compiler.backend.js.ast.JsExpression receiver)

translateAsSet

@NotNull
protected abstract com.google.dart.compiler.backend.js.ast.JsExpression translateAsSet(@Nullable
                                                                                               com.google.dart.compiler.backend.js.ast.JsExpression receiver,
                                                                                               @NotNull
                                                                                               com.google.dart.compiler.backend.js.ast.JsExpression setTo)