예제 #1
0
  @Override
  public JetType getClassObjectType() {
    checkInitialized();
    if (classObjectUpperBounds.isEmpty()) return null;

    if (classObjectBoundsAsType == null) {
      classObjectBoundsAsType =
          TypeUtils.intersect(JetTypeChecker.INSTANCE, classObjectUpperBounds);
      if (classObjectBoundsAsType == null) {
        classObjectBoundsAsType = KotlinBuiltIns.getInstance().getNothingType();
      }
    }
    return classObjectBoundsAsType;
  }
예제 #2
0
 @Override
 @NotNull
 public JetType getUpperBoundsAsType() {
   checkInitialized();
   if (upperBoundsAsType == null) {
     assert upperBounds != null : "Upper bound list is null in " + getName();
     assert upperBounds.size() > 0 : "Upper bound list is empty in " + getName();
     upperBoundsAsType = TypeUtils.intersect(JetTypeChecker.INSTANCE, upperBounds);
     if (upperBoundsAsType == null) {
       upperBoundsAsType = KotlinBuiltIns.getInstance().getNothingType();
     }
   }
   return upperBoundsAsType;
 }
예제 #3
0
 @Override
 public int getIndex() {
   checkInitialized();
   return index;
 }
예제 #4
0
 @Override
 public <R, D> R accept(DeclarationDescriptorVisitor<R, D> visitor, D data) {
   checkInitialized();
   return visitor.visitTypeParameterDescriptor(this, data);
 }
예제 #5
0
 @Override
 @NotNull
 public JetType getLowerBoundsAsType() {
   checkInitialized();
   return KotlinBuiltIns.getInstance().getNothingType();
 }
예제 #6
0
 @Override
 @NotNull
 public Set<JetType> getUpperBounds() {
   checkInitialized();
   return upperBounds;
 }
예제 #7
0
 @Override
 public boolean isReified() {
   checkInitialized();
   return reified;
 }