org.jetbrains.kotlin.descriptors.impl
Class ScriptDescriptorImpl

java.lang.Object
  extended by org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
      extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
          extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
              extended by org.jetbrains.kotlin.descriptors.impl.ScriptDescriptorImpl
All Implemented Interfaces:
Annotated, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, Named, ScriptDescriptor

public class ScriptDescriptorImpl
extends DeclarationDescriptorNonRootImpl
implements ScriptDescriptor


Field Summary
 
Fields inherited from interface org.jetbrains.kotlin.descriptors.ScriptDescriptor
LAST_EXPRESSION_VALUE_FIELD_NAME, NAME
 
Constructor Summary
ScriptDescriptorImpl(DeclarationDescriptor containingDeclaration, int priority, JetScope scriptScope, Name className, SourceElement source)
           
 
Method Summary
<R,D> R
accept(DeclarationDescriptorVisitor<R,D> visitor, D data)
           
static ConstructorDescriptorImpl createConstructor(ScriptDescriptor scriptDescriptor, java.util.List<ValueParameterDescriptor> valueParameters)
           
static PropertyDescriptor createPropertyFromScriptParameter(ScriptDescriptor scriptDescriptor, ValueParameterDescriptor parameter)
           
static PropertyDescriptor createScriptResultProperty(ScriptDescriptor scriptDescriptor)
           
 ClassDescriptor getClassDescriptor()
           
 int getPriority()
           
 WritableScope getScopeForBodyResolution()
           
 ScriptCodeDescriptor getScriptCodeDescriptor()
           
 PropertyDescriptor getScriptResultProperty()
           
 ReceiverParameterDescriptor getThisAsReceiverParameter()
           
 void initialize(JetType returnType, java.util.List<? extends PropertyDescriptorImpl> properties, java.util.List<? extends FunctionDescriptor> functions)
           
 void setScopeForBodyResolution(WritableScope scopeForBodyResolution)
           
 void setValueParameters(java.util.List<ValueParameterDescriptor> valueParameters)
           
 DeclarationDescriptor substitute(TypeSubstitutor substitutor)
           
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
getContainingDeclaration, getSource
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
acceptVoid, getName, getOriginal, toString
 
Methods inherited from class org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
getAnnotations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorNonRoot
getContainingDeclaration
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
getSource
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptor
acceptVoid, getOriginal
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.annotations.Annotated
getAnnotations
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.Named
getName
 

Constructor Detail

ScriptDescriptorImpl

public ScriptDescriptorImpl(@NotNull
                            DeclarationDescriptor containingDeclaration,
                            int priority,
                            @NotNull
                            JetScope scriptScope,
                            @NotNull
                            Name className,
                            @NotNull
                            SourceElement source)
Method Detail

initialize

public void initialize(@NotNull
                       JetType returnType,
                       @NotNull
                       java.util.List<? extends PropertyDescriptorImpl> properties,
                       @NotNull
                       java.util.List<? extends FunctionDescriptor> functions)

createScriptResultProperty

@NotNull
public static PropertyDescriptor createScriptResultProperty(@NotNull
                                                                    ScriptDescriptor scriptDescriptor)

getScriptResultProperty

@NotNull
public PropertyDescriptor getScriptResultProperty()
Specified by:
getScriptResultProperty in interface ScriptDescriptor

getPriority

public int getPriority()
Specified by:
getPriority in interface ScriptDescriptor

getScriptCodeDescriptor

@NotNull
public ScriptCodeDescriptor getScriptCodeDescriptor()
Specified by:
getScriptCodeDescriptor in interface ScriptDescriptor

getThisAsReceiverParameter

@NotNull
public ReceiverParameterDescriptor getThisAsReceiverParameter()
Specified by:
getThisAsReceiverParameter in interface ScriptDescriptor

substitute

public DeclarationDescriptor substitute(@NotNull
                                        TypeSubstitutor substitutor)
Specified by:
substitute in interface DeclarationDescriptor

accept

public <R,D> R accept(DeclarationDescriptorVisitor<R,D> visitor,
                      D data)
Specified by:
accept in interface DeclarationDescriptor

setValueParameters

public void setValueParameters(@NotNull
                               java.util.List<ValueParameterDescriptor> valueParameters)

createConstructor

@NotNull
public static ConstructorDescriptorImpl createConstructor(@NotNull
                                                                  ScriptDescriptor scriptDescriptor,
                                                                  @NotNull
                                                                  java.util.List<ValueParameterDescriptor> valueParameters)

createPropertyFromScriptParameter

@NotNull
public static PropertyDescriptor createPropertyFromScriptParameter(@NotNull
                                                                           ScriptDescriptor scriptDescriptor,
                                                                           @NotNull
                                                                           ValueParameterDescriptor parameter)

getClassDescriptor

@NotNull
public ClassDescriptor getClassDescriptor()
Specified by:
getClassDescriptor in interface ScriptDescriptor

getScopeForBodyResolution

@NotNull
public WritableScope getScopeForBodyResolution()
Specified by:
getScopeForBodyResolution in interface ScriptDescriptor

setScopeForBodyResolution

public void setScopeForBodyResolution(@NotNull
                                      WritableScope scopeForBodyResolution)