@Override protected BucketedEObjectDescription createDescription(QualifiedName name, JvmFeature feature, TypeBucket bucket) { return new StaticFeatureDescription(name, feature, bucket.getId(), getSession().isVisible(feature)); }
protected BucketedEObjectDescription doCreateDescription(QualifiedName name, JvmFeature feature, TypeBucket bucket) { if (implicit) { return new StaticExtensionFeatureDescriptionWithImplicitFirstArgument(name, feature, receiver, receiverType, bucket.getId(), getSession().isVisible(feature)); } return new StaticExtensionFeatureDescription(name, feature, receiver, receiverType, bucket.getId(), getSession().isVisible(feature)); }
protected IEObjectDescription createDescription(QualifiedName name, JvmFeature feature, TypeBucket bucket) { if (receiver != null) { return new StaticFeatureDescriptionWithSyntacticReceiver(name, feature, receiver, receiverType, bucket.getId(), getSession().isVisible(feature)); } if (receiverType != null) { return new StaticFeatureDescriptionWithImplicitReceiver(name, feature, receiverType, bucket.getId(), getSession().isVisible(feature)); } return new StaticFeatureDescription(name, feature, bucket.getId(), getSession().isVisible(feature)); }
protected IEObjectDescription createInstanceDescription(QualifiedName name, JvmFeature feature, TypeBucket bucket) { return new InstanceFeatureDescriptionWithoutReceiver(name, feature, bucket.getId(), getSession().isVisible(feature)); }
protected IEObjectDescription createDescription(QualifiedName name, JvmFeature feature, TypeBucket bucket) { if (implicit) { return new InstanceFeatureDescriptionWithImplicitReceiver(name, feature, receiver, receiverType, getReceiverTypeParameterMapping(), bucket.getFlags(), bucket.getId(), isVisible(feature), validStaticState); } else { return new InstanceFeatureDescription(name, feature, receiver, receiverType, getReceiverTypeParameterMapping(), bucket.getFlags(), bucket.getId(), isVisible(feature)); } }
@Override protected IEObjectDescription createDescription(QualifiedName name, JvmFeature feature, TypeBucket bucket) { return new StaticFeatureDescriptionWithTypeLiteralReceiver(name, feature, getReceiver(), getReceiverType(), bucket.getId(), getSession().isVisible(feature)); }
@Override protected List<IEObjectDescription> getLocalElementsByName(QualifiedName name) { if (THIS.equals(name)) { ITypeReferenceOwner owner = getReceiverType().getOwner(); QualifiedThisOrSuperDescription description = new QualifiedThisOrSuperDescription(name, owner.newParameterizedTypeReference(getTypeLiteral()), getBucket().getId(), true, getReceiver()); return Collections.<IEObjectDescription>singletonList(description); } else if (SUPER.equals(name)) { JvmType receiverRawType = getTypeLiteral(); if (receiverRawType instanceof JvmDeclaredType) { JvmType referencedType = receiverRawType; // If the receiver type is an interface, 'super' always refers to that interface if (!(receiverRawType instanceof JvmGenericType && ((JvmGenericType) receiverRawType).isInterface())) { JvmTypeReference superType = ((JvmDeclaredType) receiverRawType).getExtendedClass(); if (superType != null) { referencedType = superType.getType(); } } ITypeReferenceOwner owner = getReceiverType().getOwner(); QualifiedThisOrSuperDescription description = new QualifiedThisOrSuperDescription(name, owner.newParameterizedTypeReference(referencedType), getBucket().getId(), true, getReceiver()); return Collections.<IEObjectDescription>singletonList(description); } return Collections.emptyList(); } return super.getLocalElementsByName(name); }
@Override protected List<IEObjectDescription> getAllLocalElements() { List<IEObjectDescription> result = super.getAllLocalElements(); if (getSession().isInstanceContext() && !isExplicitStaticFeatureCall()) { ITypeReferenceOwner owner = getReceiverType().getOwner(); QualifiedThisOrSuperDescription thisDescription = new QualifiedThisOrSuperDescription(THIS, owner.newParameterizedTypeReference(getTypeLiteral()), getBucket().getId(), true, getReceiver()); addToList(thisDescription, result); JvmType receiverRawType = getTypeLiteral(); if (receiverRawType instanceof JvmDeclaredType) { JvmType referencedType = receiverRawType; // If the receiver type is an interface, 'super' always refers to that interface if (!(receiverRawType instanceof JvmGenericType && ((JvmGenericType) receiverRawType).isInterface())) { JvmTypeReference superType = ((JvmDeclaredType) receiverRawType).getExtendedClass(); if (superType != null) { referencedType = superType.getType(); } } QualifiedThisOrSuperDescription superDescription = new QualifiedThisOrSuperDescription(SUPER, owner.newParameterizedTypeReference(referencedType), getBucket().getId(), true, getReceiver()); addToList(superDescription, result); } } return result; }