@Override protected List<JvmTypeReference> getPlainSyntacticTypeArguments() { return getConstructorCall().getTypeArguments(); }
@Override protected List<JvmTypeReference> getPlainSyntacticTypeArguments() { return getConstructorCall().getTypeArguments(); }
public String typeArguments(XConstructorCall constructorCall) { return "<" + referencesToString(constructorCall.getTypeArguments()) + ">"; }
public List<LightweightTypeReference> getSyntacticTypeArguments() { XConstructorCall constructorCall = getConstructorCall(); List<JvmTypeReference> typeArguments = constructorCall.getTypeArguments(); if (typeArguments.isEmpty()) return Collections.emptyList(); List<LightweightTypeReference> result = Lists.newArrayList(); for(JvmTypeReference typeArgument: typeArguments) { result.add(getState().getReferenceOwner().toLightweightTypeReference(typeArgument)); } return result; }
@Override public List<LightweightTypeReference> getTypeArguments() { XConstructorCall constructorCall = getConstructorCall(); List<JvmTypeReference> typeArguments = constructorCall.getTypeArguments(); if (typeArguments.isEmpty()) return Collections.emptyList(); List<LightweightTypeReference> result = Lists.newArrayList(); for(JvmTypeReference typeArgument: typeArguments) { result.add(getState().getReferenceOwner().toLightweightTypeReference(typeArgument)); } return result; }
@Check public void checkTypeArguments(XConstructorCall expression) { for (JvmTypeReference typeRef : expression.getTypeArguments()) { ensureNotPrimitiveNorWildcard(typeRef); } }
protected JvmParameterizedTypeReference createSuperTypeReference(JvmType superType, XConstructorCall constructorCall) { JvmParameterizedTypeReference result = TypesFactory.eINSTANCE.createJvmParameterizedTypeReference(); result.setType(superType); for(JvmTypeReference typeReference: constructorCall.getTypeArguments()) { result.getArguments().add(typesBuilder.cloneWithProxies(typeReference)); } return result; }
@Override protected LightweightTypeReference deferredBindTypeArgument(ITypeExpectation expectation, LightweightTypeReference type) { LightweightTypeReference result = super.deferredBindTypeArgument(expectation, type); LightweightTypeReference expectedType = expectation.getExpectedType(); if (expectedType != null && getConstructorCall().getTypeArguments().isEmpty() && !result.isRawType() && !getDeclaredTypeParameters().isEmpty()) { if (!expectedType.isAssignableFrom(result, TypeConformanceComputationArgument.DEFAULT)) { LightweightTypeReference rawFeatureType = result.getRawTypeReference(); if (expectedType.isAssignableFrom(rawFeatureType)) { result = rawFeatureType; getTypeParameterMapping().clear(); } } } return result; }
List<JvmTypeParameter> constructorTypeParameters = constructor.getTypeParameters(); boolean hasTypeArguments = !typeArguments.isEmpty() && (featureLinkHelper.getDeclaredTypeParameters(constructor).size() == typeArguments.size()); List<JvmTypeReference> explicitTypeArguments = expr.getTypeArguments(); List<LightweightTypeReference> constructorTypeArguments = Collections.emptyList(); if (hasTypeArguments) {
List<JvmTypeReference> typeArguments = constructorCall.getTypeArguments(); if (!typeArguments.isEmpty()) { acceptor.accept(constructorCallElements.getTypeArgumentsJvmArgumentTypeReferenceParserRuleCall_3_1_0(), typeArguments.get(0), 0);
}; format.prepend(this.textRegionExtensions.regionFor(expr).feature(XbasePackage.Literals.XCONSTRUCTOR_CALL__CONSTRUCTOR), _function); boolean _isEmpty = expr.getTypeArguments().isEmpty(); boolean _not = (!_isEmpty); if (_not) { }; format.surround(this.textRegionExtensions.regionFor(expr).keyword("<"), _function_1); EList<JvmTypeReference> _typeArguments = expr.getTypeArguments(); for (final JvmTypeReference arg : _typeArguments) {
Function1<? super FormattableDocument, ? extends Iterable<FormattingData>> _prepend = this._formattingDataFactory.prepend(this._nodeModelAccess.nodeForFeature(expr, XbasePackage.Literals.XCONSTRUCTOR_CALL__CONSTRUCTOR), _function); format.operator_add(_prepend); boolean _isEmpty = expr.getTypeArguments().isEmpty(); boolean _not = (!_isEmpty); if (_not) { Function1<? super FormattableDocument, ? extends Iterable<FormattingData>> _surround = this._formattingDataFactory.surround(this._nodeModelAccess.nodeForKeyword(expr, "<"), _function_1); format.operator_add(_surround); EList<JvmTypeReference> _typeArguments = expr.getTypeArguments(); for (final JvmTypeReference arg : _typeArguments) {