org.jetbrains.k2js.translate.context
Class Namer

java.lang.Object
  extended by org.jetbrains.k2js.translate.context.Namer

public final class Namer
extends java.lang.Object

Encapuslates different types of constants and naming conventions.


Field Summary
static java.lang.String CALLEE_NAME
           
static java.lang.String CAPTURED_VAR_FIELD
           
static java.lang.String KOTLIN_LOWER_NAME
           
static java.lang.String KOTLIN_NAME
           
static JsNameRef KOTLIN_OBJECT_REF
           
 
Method Summary
 JsExpression classCreateInvocation(ClassDescriptor descriptor)
           
 JsExpression classCreationMethodReference()
           
 JsExpression enumEntriesCreationMethodReference()
           
 JsInvocation enumEntriesObjectCreateInvocation()
           
 JsExpression getCallGetProperty()
           
 JsExpression getCallSetProperty()
           
static JsNameRef getCapturedVarAccessor(JsExpression ref)
           
static JsExpression getClassObjectAccessor(JsExpression referenceToClass)
           
static java.lang.String getDelegateName(java.lang.String propertyName)
           
static JsNameRef getDelegateNameRef(java.lang.String propertyName)
           
static JsNameRef getFunctionApplyRef(JsExpression functionExpression)
           
static JsNameRef getFunctionCallRef(JsExpression functionExpression)
           
static java.lang.String getKotlinBackingFieldName(java.lang.String propertyName)
           
static java.lang.String getNameForAccessor(java.lang.String propertyName, boolean isGetter, boolean useNativeAccessor)
           
static java.lang.String getNameForClassObjectInitializer()
           
static java.lang.String getPrototypeName()
           
static java.lang.String getReceiverParameterName()
           
static JsNameRef getRefToPrototype(JsExpression classOrTraitExpression)
           
static java.lang.String getRootPackageName()
           
 JsExpression getUndefinedExpression()
           
 JsExpression isOperationReference()
           
 JsExpression kotlin(java.lang.String name)
           
 JsNameRef kotlinObject()
           
static Namer newInstance(JsScope rootScope)
           
 JsExpression objectCreationMethodReference()
           
 JsExpression packageDefinitionMethodReference()
           
 JsExpression rootPackageDefinitionMethodReference()
           
static JsNameRef superMethodNameRef(JsName superClassJsName)
           
 JsExpression throwNPEFunctionRef()
           
 JsExpression traitCreationMethodReference()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KOTLIN_NAME

public static final java.lang.String KOTLIN_NAME
See Also:
Constant Field Values

KOTLIN_LOWER_NAME

public static final java.lang.String KOTLIN_LOWER_NAME

KOTLIN_OBJECT_REF

public static final JsNameRef KOTLIN_OBJECT_REF

CALLEE_NAME

public static final java.lang.String CALLEE_NAME
See Also:
Constant Field Values

CAPTURED_VAR_FIELD

public static final java.lang.String CAPTURED_VAR_FIELD
See Also:
Constant Field Values
Method Detail

getReceiverParameterName

@NotNull
public static java.lang.String getReceiverParameterName()

getRootPackageName

@NotNull
public static java.lang.String getRootPackageName()

superMethodNameRef

@NotNull
public static JsNameRef superMethodNameRef(@NotNull
                                                   JsName superClassJsName)

getNameForAccessor

@NotNull
public static java.lang.String getNameForAccessor(@NotNull
                                                          java.lang.String propertyName,
                                                          boolean isGetter,
                                                          boolean useNativeAccessor)

getKotlinBackingFieldName

@NotNull
public static java.lang.String getKotlinBackingFieldName(@NotNull
                                                                 java.lang.String propertyName)

getClassObjectAccessor

@NotNull
public static JsExpression getClassObjectAccessor(@NotNull
                                                          JsExpression referenceToClass)

getNameForClassObjectInitializer

@NotNull
public static java.lang.String getNameForClassObjectInitializer()

getPrototypeName

@NotNull
public static java.lang.String getPrototypeName()

getRefToPrototype

@NotNull
public static JsNameRef getRefToPrototype(@NotNull
                                                  JsExpression classOrTraitExpression)

getDelegateName

@NotNull
public static java.lang.String getDelegateName(@NotNull
                                                       java.lang.String propertyName)

getDelegateNameRef

@NotNull
public static JsNameRef getDelegateNameRef(java.lang.String propertyName)

getFunctionCallRef

@NotNull
public static JsNameRef getFunctionCallRef(@NotNull
                                                   JsExpression functionExpression)

getFunctionApplyRef

@NotNull
public static JsNameRef getFunctionApplyRef(@NotNull
                                                    JsExpression functionExpression)

getCapturedVarAccessor

@NotNull
public static JsNameRef getCapturedVarAccessor(@NotNull
                                                       JsExpression ref)

newInstance

@NotNull
public static Namer newInstance(@NotNull
                                        JsScope rootScope)

classCreationMethodReference

@NotNull
public JsExpression classCreationMethodReference()

enumEntriesCreationMethodReference

@NotNull
public JsExpression enumEntriesCreationMethodReference()

traitCreationMethodReference

@NotNull
public JsExpression traitCreationMethodReference()

packageDefinitionMethodReference

@NotNull
public JsExpression packageDefinitionMethodReference()

rootPackageDefinitionMethodReference

@NotNull
public JsExpression rootPackageDefinitionMethodReference()

objectCreationMethodReference

@NotNull
public JsExpression objectCreationMethodReference()

throwNPEFunctionRef

@NotNull
public JsExpression throwNPEFunctionRef()

kotlin

@NotNull
public JsExpression kotlin(@NotNull
                                   java.lang.String name)

kotlinObject

@NotNull
public JsNameRef kotlinObject()

isOperationReference

@NotNull
public JsExpression isOperationReference()

classCreateInvocation

@NotNull
public JsExpression classCreateInvocation(@NotNull
                                                  ClassDescriptor descriptor)

enumEntriesObjectCreateInvocation

@NotNull
public JsInvocation enumEntriesObjectCreateInvocation()

getUndefinedExpression

@NotNull
public JsExpression getUndefinedExpression()

getCallGetProperty

@NotNull
public JsExpression getCallGetProperty()

getCallSetProperty

@NotNull
public JsExpression getCallSetProperty()