Beispiel #1
0
    @NotNull
    @Override
    public List<TypeParameterDescriptor> getParameters() {
      if (parameters == null) {
        JetClassLikeInfo classInfo = declarationProvider.getOwnerInfo();
        List<JetTypeParameter> typeParameters = classInfo.getTypeParameters();
        parameters = new ArrayList<TypeParameterDescriptor>(typeParameters.size());

        for (int i = 0; i < typeParameters.size(); i++) {
          parameters.add(
              new LazyTypeParameterDescriptor(
                  resolveSession, LazyClassDescriptor.this, typeParameters.get(i), i));
        }
      }
      return parameters;
    }
Beispiel #2
0
 private void findAndDisconnectLoopsInTypeHierarchy(List<JetType> supertypes) {
   for (Iterator<JetType> iterator = supertypes.iterator(); iterator.hasNext(); ) {
     JetType supertype = iterator.next();
     if (isReachable(supertype.getConstructor(), this, new HashSet<TypeConstructor>())) {
       iterator.remove();
     }
   }
 }