protected String _getFullName(final XMemberFeatureCall call) { final String prefix = this.getFullName(call.getMemberCallTarget()); String _concreteSyntaxFeatureName = call.getConcreteSyntaxFeatureName(); return ((prefix + ".") + _concreteSyntaxFeatureName); }
/** Convert the boolean constant to the object equivalent if possible. * * @param expression the expression to convert. * @return one of the boolean constants {@link Boolean#TRUE} or {@link Boolean#FALSE}, * or {@code null} if the expression is not a constant boolean expression. */ @SuppressWarnings("static-method") public Boolean toBooleanPrimitiveWrapperConstant(XExpression expression) { if (expression instanceof XBooleanLiteral) { return ((XBooleanLiteral) expression).isIsTrue() ? Boolean.TRUE : Boolean.FALSE; } if (expression instanceof XMemberFeatureCall) { final XMemberFeatureCall call = (XMemberFeatureCall) expression; final XExpression receiver = call.getMemberCallTarget(); if (receiver instanceof XFeatureCall) { final XFeatureCall call2 = (XFeatureCall) receiver; final String call2Identifier = call2.getConcreteSyntaxFeatureName(); if (Boolean.class.getSimpleName().equals(call2Identifier) || Boolean.class.getName().equals(call2Identifier)) { final String callIdentifier = call.getConcreteSyntaxFeatureName(); if ("TRUE".equals(callIdentifier)) { //$NON-NLS-1$ return Boolean.TRUE; } else if ("FALSE".equals(callIdentifier)) { //$NON-NLS-1$ return Boolean.FALSE; } } } } return null; }
@Check public void checkExplicitOperationCall(XMemberFeatureCall featureCall) { if (featureCall.getFeature() instanceof JvmOperation && !featureCall.isExplicitOperationCallOrBuilderSyntax() && featureCall.getFeature().getSimpleName().equals(featureCall.getConcreteSyntaxFeatureName())) { addIssue("Method call without parentheses", featureCall, XbasePackage.Literals.XABSTRACT_FEATURE_CALL__FEATURE, OPERATION_WITHOUT_PARENTHESES); } }
@Check void checkNullSafeFeatureCallWithPrimitives(XMemberFeatureCall featureCall) { if (featureCall.isNullSafe()) { if (getActualType(featureCall.getMemberCallTarget()).isPrimitive()) { error("Cannot use null-safe feature call on primitive receiver", featureCall, Literals.XMEMBER_FEATURE_CALL__NULL_SAFE, NULL_SAFE_FEATURE_CALL_ON_PRIMITIVE); return; } LightweightTypeReference type = getActualType(featureCall); if (type.isPrimitive() && isValueExpectedRecursive(featureCall)) { addIssue("Null-safe call of primitive-valued feature " + featureCall.getConcreteSyntaxFeatureName() + ", default value "+ getDefaultValue(type) +" will be used", featureCall, NULL_SAFE_FEATURE_CALL_OF_PRIMITIVE_VALUED_FEATURE); } } }
String _identifier = type.getIdentifier(); String _plus = (_identifier + "$"); String _concreteSyntaxFeatureName = ((XMemberFeatureCall)expression).getConcreteSyntaxFeatureName(); String _plus_1 = (_plus + _concreteSyntaxFeatureName); QualifiedName _lowerCase = this.nameConverter.toQualifiedName(_plus_1).toLowerCase();
final String featureName = it.getConcreteSyntaxFeatureName(); try { final Object receiver = this.evaluate(it.getMemberCallTarget(), ctx);
String _concreteSyntaxFeatureName = ((XMemberFeatureCall)featureCall).getConcreteSyntaxFeatureName(); String _plus = ("\'" + _concreteSyntaxFeatureName); String _plus_1 = (_plus + "\' is not a member of \'");