Example #1
0
 private void resolveAnonymousInitializers() {
   for (Map.Entry<JetClass, MutableClassDescriptor> entry : context.getClasses().entrySet()) {
     resolveAnonymousInitializers(entry.getKey(), entry.getValue());
   }
   for (Map.Entry<JetObjectDeclaration, MutableClassDescriptor> entry :
       context.getObjects().entrySet()) {
     resolveAnonymousInitializers(entry.getKey(), entry.getValue());
   }
 }
Example #2
0
 private void resolveDelegationSpecifierLists() {
   // TODO : Make sure the same thing is not initialized twice
   for (Map.Entry<JetClass, MutableClassDescriptor> entry : context.getClasses().entrySet()) {
     resolveDelegationSpecifierList(entry.getKey(), entry.getValue());
   }
   for (Map.Entry<JetObjectDeclaration, MutableClassDescriptor> entry :
       context.getObjects().entrySet()) {
     resolveDelegationSpecifierList(entry.getKey(), entry.getValue());
   }
 }
Example #3
0
 private void resolveAnnotationStubsOnClassesAndConstructors() {
   AnnotationResolver annotationResolver =
       new AnnotationResolver(context.getSemanticServices(), context.getTrace());
   for (Map.Entry<JetClass, MutableClassDescriptor> entry : context.getClasses().entrySet()) {
     JetClass jetClass = entry.getKey();
     MutableClassDescriptor descriptor = entry.getValue();
     resolveAnnotationsForClassOrObject(annotationResolver, jetClass, descriptor);
   }
   for (Map.Entry<JetObjectDeclaration, MutableClassDescriptor> entry :
       context.getObjects().entrySet()) {
     JetObjectDeclaration objectDeclaration = entry.getKey();
     MutableClassDescriptor descriptor = entry.getValue();
     resolveAnnotationsForClassOrObject(annotationResolver, objectDeclaration, descriptor);
   }
 }
Example #4
0
  private void resolveFunctionAndPropertyHeaders() {
    for (Map.Entry<JetFile, WritableScope> entry : context.getNamespaceScopes().entrySet()) {
      JetFile namespace = entry.getKey();
      WritableScope namespaceScope = entry.getValue();
      NamespaceLike namespaceDescriptor = context.getNamespaceDescriptors().get(namespace);

      resolveFunctionAndPropertyHeaders(
          namespace.getDeclarations(),
          namespaceScope,
          namespaceScope,
          namespaceScope,
          namespaceDescriptor);
    }
    for (Map.Entry<JetClass, MutableClassDescriptor> entry : context.getClasses().entrySet()) {
      JetClass jetClass = entry.getKey();
      MutableClassDescriptor classDescriptor = entry.getValue();

      resolveFunctionAndPropertyHeaders(
          jetClass.getDeclarations(),
          classDescriptor.getScopeForMemberResolution(),
          classDescriptor.getScopeForInitializers(),
          classDescriptor.getScopeForMemberResolution(),
          classDescriptor);
      //            processPrimaryConstructor(classDescriptor, jetClass);
      //            for (JetSecondaryConstructor jetConstructor :
      // jetClass.getSecondaryConstructors()) {
      //                processSecondaryConstructor(classDescriptor, jetConstructor);
      //            }
    }
    for (Map.Entry<JetObjectDeclaration, MutableClassDescriptor> entry :
        context.getObjects().entrySet()) {
      JetObjectDeclaration object = entry.getKey();
      MutableClassDescriptor classDescriptor = entry.getValue();

      resolveFunctionAndPropertyHeaders(
          object.getDeclarations(),
          classDescriptor.getScopeForMemberResolution(),
          classDescriptor.getScopeForInitializers(),
          classDescriptor.getScopeForMemberResolution(),
          classDescriptor);
    }

    // TODO : Extensions
  }