Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
36,100 | List<PsiType[]> (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor, String @NotNull [] options) { int argNum = extractArgNum(options); boolean index = extractIndex(options); PsiParameter[] parameters = method.getParameterList().getParameters(); if (argNum >= parameters.length) return ContainerUtil.emptyList(); PsiParameter parameter = parameters[argNum]; PsiType type = parameter.getType(); PsiType substituted = substitutor.substitute(type); if (!InheritanceUtil.isInheritor(substituted, CommonClassNames.JAVA_UTIL_MAP)) return ContainerUtil.emptyList(); PsiType key = PsiUtil.substituteTypeParameter(substituted, CommonClassNames.JAVA_UTIL_MAP, 0, true); PsiType value = PsiUtil.substituteTypeParameter(substituted, CommonClassNames.JAVA_UTIL_MAP, 1, true); PsiClass mapEntry = JavaPsiFacade.getInstance(method.getProject()).findClass(CommonClassNames.JAVA_UTIL_MAP_ENTRY, method.getResolveScope()); if (mapEntry == null) return ContainerUtil.emptyList(); PsiClassType mapEntryType = JavaPsiFacade.getElementFactory(method.getProject()).createType(mapEntry, key, value); PsiType[] keyValueSignature = index ? new PsiType[]{key, value, PsiTypes.intType()} : new PsiType[]{key, value}; PsiType[] mapEntrySignature = index ? new PsiType[]{mapEntryType, PsiTypes.intType()} : new PsiType[]{mapEntryType}; return List.of(keyValueSignature, mapEntrySignature); } | inferExpectedSignatures |
36,101 | int (String[] options) { for (String value : options) { Integer parsedValue = parseArgNum(value); if (parsedValue != null) { return parsedValue; } } if (options.length == 1) { return StringUtil.parseInt(options[0], 0); } return 0; } | extractArgNum |
36,102 | boolean (String[] options) { for (String value : options) { Boolean parsedValue = parseIndex(value); if (parsedValue != null) { return parsedValue; } } if (options.length == 1) { return Boolean.parseBoolean(options[0]); } return false; } | extractIndex |
36,103 | Boolean (String value) { Couple<String> pair = parseValue(value); if (pair == null) return null; if (INDEX.equals(pair.getFirst())) { return Boolean.valueOf(pair.getSecond()); } return null; } | parseIndex |
36,104 | Integer (String value) { Couple<String> pair = parseValue(value); if (pair == null) return null; if (ARG_NUM.equals(pair.getFirst())) { return StringUtil.parseInt(pair.getSecond(), 0); } return null; } | parseArgNum |
36,105 | Couple<String> (String value) { String[] split = value.split("="); return split.length == 2 ? Couple.of(split[0].trim(), split[1].trim()) : null; } | parseValue |
36,106 | boolean (@NotNull Position position) { return true; } | isApplicableTo |
36,107 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (CompileStaticUtil.isCompileStatic(context)) return isCSConvertible(targetType, actualType, position); if (position == Position.METHOD_PARAMETER) { return methodParameterConvert(targetType, actualType); } if (TypesUtil.isNumericType(targetType) && TypesUtil.isNumericType(actualType)) { return OK; } return null; } | isConvertible |
36,108 | ConversionResult (PsiType targetType, PsiType actualType) { if (TypesUtil.isClassType(actualType, JAVA_MATH_BIG_DECIMAL)) return isFloatOrDoubleType(targetType) ? OK : null; return null; } | methodParameterConvert |
36,109 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position currentPosition) { if (currentPosition == Position.METHOD_PARAMETER) return null; if (TypesUtil.isClassType(actualType, JAVA_MATH_BIG_DECIMAL)) return isFloatOrDoubleType(targetType) ? OK : null; if (TypesUtil.isClassType(targetType, JAVA_MATH_BIG_DECIMAL)) return TypesUtil.isNumericType(actualType) || PsiTypes.nullType().equals(actualType) ? OK : ERROR; if (TypesUtil.isClassType(targetType, JAVA_MATH_BIG_INTEGER)) return TypesUtil.isIntegralNumberType(actualType) || PsiTypes.nullType().equals(actualType) ? OK : ERROR; if (TypesUtil.isClassType(actualType, JAVA_MATH_BIG_INTEGER)) return TypesUtil.isClassType(targetType, JAVA_MATH_BIG_INTEGER, JAVA_MATH_BIG_DECIMAL) ? OK : null; if (TypesUtil.isNumericType(targetType) && TypesUtil.isNumericType(actualType)) { return OK; } return null; } | isCSConvertible |
36,110 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!isEnum(targetType)) return null; if (InheritanceUtil.isInheritor(actualType, GroovyCommonClassNames.GROOVY_LANG_GSTRING) || InheritanceUtil.isInheritor(actualType, CommonClassNames.JAVA_LANG_STRING)) { return GroovyConfigUtils.getInstance().isVersionAtLeast(context, GroovyConfigUtils.GROOVY1_8) ? ConversionResult.OK : ConversionResult.ERROR; } return null; } | isConvertible |
36,111 | PsiType (final GrVariable variable) { for (GrVariableEnhancer enhancer : EP_NAME.getExtensions()) { final PsiType type = enhancer.getVariableType(variable); if (type != null) { return type; } } return null; } | getEnhancedType |
36,112 | String () { return myHint; } | getHintName |
36,113 | List<PsiType[]> (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor, String @NotNull [] options) { PsiParameter[] parameters = method.getParameterList().getParameters(); if (myParam < parameters.length) { PsiParameter parameter = parameters[myParam]; PsiType originalType = parameter.getType(); PsiType substituted = substitutor.substitute(originalType); if (myGeneric == -1) { return produceResult(substituted); } else { if (substituted instanceof PsiClassType) { PsiType[] typeParameters = ((PsiClassType)substituted).getParameters(); if (myGeneric < typeParameters.length) { return produceResult(typeParameters[myGeneric]); } //if (substituted.equalsToText(CommonClassNames.JAVA_LANG_STRING)) { // return produceResult(TypesUtil.createType(CommonClassNames.JAVA_LANG_CHARACTER, method)); //} } } } return ContainerUtil.emptyList(); } | inferExpectedSignatures |
36,114 | ArrayList<PsiType[]> (@Nullable PsiType type) { PsiType notNull = type != null ? type : (PsiPrimitiveType)PsiTypes.nullType(); PsiType[] signature = {notNull}; ArrayList<PsiType[]> result = new ArrayList<>(); result.add(signature); return result; } | produceResult |
36,115 | String[] (PsiAnnotation anno) { PsiAnnotationMemberValue options = anno.findAttributeValue("options"); ArrayList<String> result = new ArrayList<>(); for (PsiAnnotationMemberValue initializer : AnnotationUtil.arrayAttributeValues(options)) { if (initializer instanceof PsiLiteral) { Object value = ((PsiLiteral)initializer).getValue(); if (value instanceof String) { result.add((String)value); } } } return ArrayUtilRt.toStringArray(result); } | buildOptions |
36,116 | SignatureHintProcessor (@NotNull String hint) { for (SignatureHintProcessor processor : EP_NAME.getExtensions()) { if (hint.equals(processor.getHintName())) { return processor; } } return null; } | getHintProcessor |
36,117 | boolean (@NotNull Position position) { return switch (position) { case METHOD_PARAMETER, GENERIC_PARAMETER, ASSIGNMENT, RETURN_VALUE -> true; default -> false; }; } | isApplicableTo |
36,118 | ConversionResult (@NotNull PsiType ltype, @NotNull PsiType rtype, @NotNull Position position, @NotNull GroovyPsiElement context) { PsiType lBound = TypesKt.promoteLowerBoundWildcard(ltype, context); PsiType rBound = TypesKt.promoteLowerBoundWildcard(rtype, context); if (lBound == null || rBound == null) return null; if (TypeConversionUtil.isAssignable(lBound, rBound)) return ConversionResult.OK; return null; } | isConvertible |
36,119 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!(targetType instanceof PsiArrayType) || !(actualType instanceof GrTupleType)) return null; final PsiType lComponentType = ((PsiArrayType)targetType).getComponentType(); for (PsiType rComponentType : ((GrTupleType)actualType).getComponentTypes()) { if (!TypesUtil.isAssignableByParameter(lComponentType, rComponentType, context)) return null; } return ConversionResult.OK; } | isConvertible |
36,120 | boolean (@NotNull Position position) { return position == Position.ASSIGNMENT; } | isApplicableTo |
36,121 | GrLiteral (@NotNull GroovyPsiElement context) { final GrExpression expression; if (context instanceof GrTypeCastExpression) { expression = ((GrTypeCastExpression)context).getOperand(); } else if (context instanceof GrAssignmentExpression) { expression = ((GrAssignmentExpression)context).getRValue(); } else if (context instanceof GrVariable) { expression = ((GrVariable)context).getInitializerGroovy(); } else if (context instanceof GrReturnStatement) { expression = ((GrReturnStatement)context).getReturnValue(); } else { expression = context instanceof GrExpression ? (GrExpression)context : null; } return expression instanceof GrLiteral ? (GrLiteral)expression : null; } | getLiteral |
36,122 | boolean (@NotNull Position position) { return position == Position.ASSIGNMENT || position == Position.RETURN_VALUE; } | isApplicableTo |
36,123 | Collection<ConstraintFormula> (@NotNull PsiType leftType, @NotNull PsiType rightType, @NotNull Position position, @NotNull PsiElement context) { return null; } | reduceTypeConstraint |
36,124 | boolean (@NotNull Position position) { return position != Position.EXPLICIT_CAST && position != Position.GENERIC_PARAMETER; } | isApplicableTo |
36,125 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!PsiTypes.booleanType().equals(TypesUtil.unboxPrimitiveTypeWrapper(targetType))) return null; return switch (position) { case ASSIGNMENT, RETURN_VALUE -> ConversionResult.OK; default -> null; }; } | isConvertible |
36,126 | boolean (@NotNull Position position) { return switch (position) { case ASSIGNMENT, RETURN_VALUE -> true; default -> false; }; } | isApplicableTo |
36,127 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!PsiTypesUtil.classNameEquals(targetType, CommonClassNames.JAVA_LANG_CLASS)) { return null; } if (PsiTypesUtil.classNameEquals(actualType, CommonClassNames.JAVA_LANG_CLASS)) { return null; } if (actualType == PsiTypes.nullType()) return ConversionResult.OK; final GrLiteral literal = getLiteral(context); final Object value = literal == null ? null : literal.getValue(); final String fqn = value == null ? null : value.toString(); final PsiClass psiClass = fqn == null ? null : JavaPsiFacade.getInstance(context.getProject()).findClass( fqn, context.getResolveScope() ); return psiClass == null ? ConversionResult.WARNING : ConversionResult.OK; } | isConvertible |
36,128 | ConversionResult (@NotNull PsiType lType, @NotNull PsiType rType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (isCompileStatic(context)) return null; if (lType instanceof PsiArrayType) { PsiType lComponentType = ((PsiArrayType)lType).getComponentType(); PsiType rComponentType = ClosureParameterEnhancer.findTypeForIteration(rType, context); if (rComponentType != null && TypesUtil.isAssignable(lComponentType, rComponentType, context)) { return ConversionResult.OK; } } return null; } | isConvertible |
36,129 | String () { return "groovy.transform.stc.SimpleType"; } | getHintName |
36,130 | List<PsiType[]> (@NotNull final PsiMethod method, @NotNull PsiSubstitutor substitutor, String @NotNull [] options) { return Collections.singletonList(ContainerUtil.map(options, value -> { try { return JavaPsiFacade.getElementFactory(method.getProject()).createTypeFromText(value, method); } catch (IncorrectOperationException e) { return PsiTypes.nullType(); } }, new PsiType[options.length])); } | inferExpectedSignatures |
36,131 | ConversionResult (@NotNull PsiType lType, @NotNull PsiType rType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!PsiTypes.charType().equals(TypesUtil.unboxPrimitiveTypeWrapper(lType))) return null; if (PsiTypes.charType().equals(TypesUtil.unboxPrimitiveTypeWrapper(rType))) return ConversionResult.OK; // can assign numeric types to char if (TypesUtil.isNumericType(rType)) { if (rType instanceof PsiPrimitiveType || TypesUtil.unboxPrimitiveTypeWrapper(rType) instanceof PsiPrimitiveType) { return PsiTypes.charType().equals(lType) ? ConversionResult.OK : ConversionResult.ERROR; } else { // BigDecimal && BigInteger return ConversionResult.ERROR; } } { // special case 'c = []' will throw RuntimeError final GrExpression rValue; if (context instanceof GrAssignmentExpression) { final GrAssignmentExpression assignmentExpression = (GrAssignmentExpression)context; rValue = assignmentExpression.getRValue(); } else if (context instanceof GrVariable) { final GrVariable assignmentExpression = (GrVariable)context; rValue = assignmentExpression.getInitializerGroovy(); } else { rValue = null; } if (rValue instanceof GrListOrMap && ((GrListOrMap)rValue).isEmpty()) { return ConversionResult.WARNING; } } if (PsiTypes.booleanType().equals(TypesUtil.unboxPrimitiveTypeWrapper(rType))) { return switch (position) { case ASSIGNMENT, RETURN_VALUE -> ConversionResult.WARNING; default -> null; }; } // one-symbol string-to-char conversion doesn't work with return value if (position == Position.RETURN_VALUE) { return null; } // can cast and assign one-symbol strings to char if (!TypesUtil.isClassType(rType, CommonClassNames.JAVA_LANG_STRING)) return null; return checkSingleSymbolLiteral(context) ? ConversionResult.OK : ConversionResult.ERROR; } | isConvertible |
36,132 | boolean (GroovyPsiElement context) { final GrLiteral literal = getLiteral(context); final Object value = literal == null ? null : literal.getValue(); return value != null && value.toString().length() == 1; } | checkSingleSymbolLiteral |
36,133 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (position == ASSIGNMENT && resolvesTo(targetType, JAVA_UTIL_SET) && actualType instanceof EmptyListLiteralType) { return ConversionResult.OK; } if (isCompileStatic(context)) { return isCSConvertible(targetType, actualType, context); } if (!isCollectionOrArray(targetType) || !isCollectionOrArray(actualType)) return null; final PsiType lComponentType = extractComponentType(targetType); final PsiType rComponentType = extractComponentType(actualType); if (lComponentType == null || rComponentType == null) return ConversionResult.OK; if (TypesUtil.isAssignableByParameter(lComponentType, rComponentType, context)) return ConversionResult.OK; return null; } | isConvertible |
36,134 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull GroovyPsiElement context) { if (targetType instanceof PsiArrayType && actualType instanceof PsiArrayType) { if (((PsiArrayType)targetType).getComponentType() instanceof PsiPrimitiveType != ((PsiArrayType)actualType).getComponentType() instanceof PsiPrimitiveType) { // groovy 3.0.13 disallows boxing in array components return null; } return TypesUtil.isAssignableByParameter(((PsiArrayType)targetType).getComponentType(), ((PsiArrayType)actualType).getComponentType(), context) ? ConversionResult.OK : ConversionResult.ERROR; } return null; } | isCSConvertible |
36,135 | boolean (@NotNull Position position) { return position != Position.METHOD_PARAMETER; } | isApplicableTo |
36,136 | PsiType (PsiType type) { if (type instanceof PsiArrayType) return ((PsiArrayType)type).getComponentType(); return PsiUtil.substituteTypeParameter(type, CommonClassNames.JAVA_UTIL_COLLECTION, 0, false); } | extractComponentType |
36,137 | boolean (PsiType type) { return type instanceof PsiArrayType || InheritanceUtil.isInheritor(type, CommonClassNames.JAVA_UTIL_COLLECTION); } | isCollectionOrArray |
36,138 | String () { return "groovy.transform.stc.FirstParam.Component"; } | getHintName |
36,139 | List<PsiType[]> (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor, String @NotNull [] options) { List<PsiType[]> signatures = new FirstParamHintProcessor().inferExpectedSignatures(method, substitutor, options); if (signatures.size() == 1) { PsiType[] signature = signatures.get(0); if (signature.length == 1) { PsiType type = signature[0]; if (type instanceof PsiArrayType) { return produceResult(((PsiArrayType)type).getComponentType()); } } } return Collections.emptyList(); } | inferExpectedSignatures |
36,140 | boolean (@NotNull Position position) { return switch (position) { case RETURN_VALUE, ASSIGNMENT, METHOD_PARAMETER -> true; default -> false; }; } | isApplicableTo |
36,141 | ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { final PsiClassType objectType = TypesUtil.getJavaLangObject(context); boolean isCompileStatic = CompileStaticUtil.isCompileStatic(context); if (position == Position.RETURN_VALUE) { if (targetType.equals(objectType) && PsiTypes.voidType().equals(actualType)) { return OK; } } if (PsiTypes.voidType().equals(actualType)) { switch (position) { case RETURN_VALUE -> { // We can return void values from method. But it's very suspicious. return WARNING; } case ASSIGNMENT -> { if (targetType.equals(PsiTypes.booleanType())) return null; if (targetType.equals(PsiType.getJavaLangString(context.getManager(), context.getResolveScope()))) return WARNING; return isCompileStatic ? ERROR : WARNING; } default -> { } } } else if (actualType == PsiTypes.nullType()) { if (position == Position.RETURN_VALUE) { // We can return null from method returning primitive type, but runtime error will occur. if (targetType instanceof PsiPrimitiveType) return WARNING; } else { return targetType instanceof PsiPrimitiveType ? ERROR : OK; } } return null; } | isConvertible |
36,142 | boolean (@NotNull Position position) { return switch (position) { case METHOD_PARAMETER, GENERIC_PARAMETER, ASSIGNMENT, RETURN_VALUE -> true; default -> false; }; } | isApplicableTo |
36,143 | ConversionResult (@NotNull PsiType ltype, @NotNull PsiType rtype, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!(ltype instanceof PsiClassType && rtype instanceof PsiClassType)) { return null; } if (isCompileStatic(context)) return null; ClassResolveResult lResult = ((PsiClassType)ltype).resolveGenerics(); PsiClass lClass = lResult.getElement(); if (lClass == null) return null; if (lClass.getTypeParameters().length == 0) return null; ClassResolveResult rResult = ((PsiClassType)rtype).resolveGenerics(); PsiClass rClass = rResult.getElement(); if (rClass == null) return null; if (!InheritanceUtil.isInheritorOrSelf(rClass, lClass, true)) return null; if (!((PsiClassType)ltype).hasParameters()) return ConversionResult.OK; if (typeParametersAgree(lClass, rClass, lResult.getSubstitutor(), rResult.getSubstitutor(), context)) return ConversionResult.OK; return null; } | isConvertible |
36,144 | boolean (@NotNull PsiClass leftClass, @NotNull PsiClass rightClass, @NotNull PsiSubstitutor leftSubstitutor, @NotNull PsiSubstitutor rightSubstitutor, @NotNull PsiElement context) { if (!leftClass.hasTypeParameters()) return true; if (!leftClass.getManager().areElementsEquivalent(leftClass, rightClass)) { rightSubstitutor = TypeConversionUtil.getSuperClassSubstitutor(leftClass, rightClass, rightSubstitutor); rightClass = leftClass; } else if (!rightClass.hasTypeParameters()) return true; Iterator<PsiTypeParameter> li = PsiUtil.typeParametersIterator(leftClass); Iterator<PsiTypeParameter> ri = PsiUtil.typeParametersIterator(rightClass); while (li.hasNext()) { if (!ri.hasNext()) return false; PsiTypeParameter lp = li.next(); PsiTypeParameter rp = ri.next(); final PsiType typeLeft = leftSubstitutor.substitute(lp); if (typeLeft == null) continue; final PsiType typeRight = rightSubstitutor.substituteWithBoundsPromotion(rp); if (typeRight == null) { // compatibility feature: allow to assign raw types to generic ones return true; } if (typeLeft instanceof PsiClassType && typeRight instanceof PsiClassType) { if (!TypesUtil.isAssignableByMethodCallConversion(typeLeft, typeRight, context)) { return false; } } else if (!TypeConversionUtil.typesAgree(typeLeft, typeRight, true)) { return false; } } return true; } | typeParametersAgree |
36,145 | boolean (@NotNull Position position) { return position == Position.ASSIGNMENT || position == Position.RETURN_VALUE || position == Position.EXPLICIT_CAST || position == Position.METHOD_PARAMETER; } | isApplicableTo |
36,146 | ConversionResult (@NotNull PsiType lType, @NotNull PsiType rType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!isClassType(lType, JAVA_LANG_STRING)) return null; if (position == Position.EXPLICIT_CAST || position == Position.METHOD_PARAMETER) { return isClassType(rType, GROOVY_LANG_GSTRING) ? ConversionResult.OK : null; } return ConversionResult.OK; } | isConvertible |
36,147 | Collection<ConstraintFormula> (@NotNull PsiType leftType, @NotNull PsiType rightType, @NotNull Position position, @NotNull PsiElement context) { if (position == Position.METHOD_PARAMETER && isClassType(leftType, JAVA_LANG_STRING) && isClassType(rightType, GROOVY_LANG_GSTRING)) { return Collections.emptyList(); } else { return null; } } | reduceTypeConstraint |
36,148 | String () { return "groovy.transform.stc.ThirdParam.Component"; } | getHintName |
36,149 | List<PsiType[]> (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor, String @NotNull [] options) { List<PsiType[]> signatures = new ThirdParamHintProcessor().inferExpectedSignatures(method, substitutor, options); if (signatures.size() == 1) { PsiType[] signature = signatures.get(0); if (signature.length == 1) { PsiType type = signature[0]; if (type instanceof PsiArrayType) { return produceResult(((PsiArrayType)type).getComponentType()); } } } return Collections.emptyList(); } | inferExpectedSignatures |
36,150 | String () { return "groovy.transform.stc.SecondParam.Component"; } | getHintName |
36,151 | List<PsiType[]> (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor, String @NotNull [] options) { List<PsiType[]> signatures = new SecondParamHintProcessor().inferExpectedSignatures(method, substitutor, options); if (signatures.size() == 1) { PsiType[] signature = signatures.get(0); if (signature.length == 1) { PsiType type = signature[0]; if (type instanceof PsiArrayType) { return produceResult(((PsiArrayType)type).getComponentType()); } } } return Collections.emptyList(); } | inferExpectedSignatures |
36,152 | PsiType (@NotNull GrFunctionalExpression expression, int index) { if (!GroovyConfigUtils.getInstance().isVersionAtLeast(expression, GroovyConfigUtils.GROOVY2_3)) return null; final GrParameter[] parameters = expression.getAllParameters(); if (containsParametersWithDeclaredType(parameters)) { return null; } List<PsiType[]> fittingSignatures = findFittingSignatures(expression); if (fittingSignatures.size() == 1) { PsiType[] expectedSignature = fittingSignatures.get(0); return expectedSignature[index]; } return null; } | getClosureParameterType |
36,153 | List<PsiType[]> (@NotNull GrFunctionalExpression expression) { GrMethodCall call = findCall(expression); if (call == null) return Collections.emptyList(); GroovyResolveResult variant = call.advancedResolve(); List<PsiType[]> expectedSignatures = inferExpectedSignatures(variant, call, expression); final GrParameter[] parameters = expression.getAllParameters(); return ContainerUtil.findAll(expectedSignatures, types -> types.length == parameters.length); } | findFittingSignatures |
36,154 | List<PsiType[]> (@NotNull GroovyResolveResult variant, @NotNull GrMethodCall call, @NotNull GrFunctionalExpression expression) { PsiElement element = variant.getElement(); while (element instanceof PsiMirrorElement) element = ((PsiMirrorElement)element).getPrototype(); if (!(element instanceof PsiMethod)) return Collections.emptyList(); PsiParameter param = null; if (variant instanceof GroovyMethodResult) { GroovyMethodCandidate candidate = ((GroovyMethodResult)variant).getCandidate(); if (candidate != null) { ArgumentMapping<PsiCallParameter> mapping = candidate.getArgumentMapping(); if (mapping != null) { PsiCallParameter obj = mapping.targetParameter(new ExpressionArgument(expression)); param = obj == null ? null : obj.getPsi(); } } } else { List<Pair<PsiParameter, PsiType>> params = ResolveUtil.collectExpectedParamsByArg(expression, //TODO:Replace with new api new GroovyResolveResult[]{variant}, call.getNamedArguments(), call.getExpressionArguments(), call.getClosureArguments(), expression); if (params.isEmpty()) return Collections.emptyList(); Pair<PsiParameter, PsiType> pair = params.get(0); param = pair.getFirst(); } if (param == null) return Collections.emptyList(); PsiModifierList modifierList = param.getModifierList(); if (modifierList == null) return Collections.emptyList(); PsiAnnotation anno = modifierList.findAnnotation(GroovyCommonClassNames.GROOVY_TRANSFORM_STC_CLOSURE_PARAMS); if (anno == null) return Collections.emptyList(); PsiClass closureSignatureHint = GrAnnotationUtil.inferClassAttribute(anno, "value"); if (closureSignatureHint == null) return Collections.emptyList(); String qnameOfClosureSignatureHint = closureSignatureHint.getQualifiedName(); if (qnameOfClosureSignatureHint == null) return Collections.emptyList(); SignatureHintProcessor signatureHintProcessor = SignatureHintProcessor.getHintProcessor(qnameOfClosureSignatureHint); if (signatureHintProcessor == null) return Collections.emptyList(); PsiSubstitutor substitutor = null; if (variant instanceof GroovyMethodResult) { GroovyMethodCandidate candidate = ((GroovyMethodResult)variant).getCandidate(); if (candidate != null) { GroovyInferenceSessionBuilder builder = new GroovyInferenceSessionBuilder(call, candidate, variant.getContextSubstitutor()); substitutor = computeAnnotationBasedSubstitutor(call, builder); } } if (substitutor == null ) { substitutor = variant.getSubstitutor(); } return signatureHintProcessor.inferExpectedSignatures((PsiMethod)element, substitutor, SignatureHintProcessor.buildOptions(anno)); } | inferExpectedSignatures |
36,155 | PsiSubstitutor (@NotNull GrCall call, @NotNull GroovyInferenceSessionBuilder builder) { return builder.skipClosureIn(call).resolveMode(false).build().inferSubst(); } | computeAnnotationBasedSubstitutor |
36,156 | boolean (GrParameter[] parameters) { return ContainerUtil.find(parameters, parameter -> parameter.getDeclaredType() != null) != null; } | containsParametersWithDeclaredType |
36,157 | PsiType (@NotNull GrFunctionalExpression closure, int index) { if (CompileStaticUtil.isCompileStatic(closure)) { return null; } return inferType(closure, index); } | getClosureParameterType |
36,158 | PsiType (@NotNull GrFunctionalExpression expression, int index) { PsiElement parent = expression.getParent(); if (parent instanceof GrStringInjection && index == 0) { return TypesUtil.createTypeByFQClassName("java.io.StringWriter", expression); } if (parent instanceof GrArgumentList) parent = parent.getParent(); if (!(parent instanceof GrMethodCall)) { return null; } String methodName = findMethodName((GrMethodCall)parent); GrExpression invokedExpression = ((GrMethodCall)parent).getInvokedExpression(); if (!(invokedExpression instanceof GrReferenceExpression)) return null; GrExpression qualifier = ((GrReferenceExpression)invokedExpression).getQualifierExpression(); if (qualifier == null) return null; PsiType type = qualifier.getType(); if (type == null) { return null; } final PsiParameter[] params = expression.getAllParameters(); if (params.length == 1 && simpleTypes.containsKey(methodName)) { final String typeText = simpleTypes.get(methodName); if (typeText.indexOf('<') < 0) { return TypesUtil.createTypeByFQClassName(typeText, expression); } else { return JavaPsiFacade.getElementFactory(expression.getProject()).createTypeFromText(typeText, expression); } } if (iterations.contains(methodName)) { if (params.length == 1) { return findTypeForIteration(qualifier, expression); } if (params.length == 2 && InheritanceUtil.isInheritor(type, JAVA_UTIL_MAP)) { if (index == 0) { return PsiUtil.substituteTypeParameter(type, JAVA_UTIL_MAP, 0, true); } return PsiUtil.substituteTypeParameter(type, JAVA_UTIL_MAP, 1, true); } } else if (GdkMethodUtil.isWithName(methodName) && params.length == 1) { return type; } else if (GdkMethodUtil.EACH_WITH_INDEX.equals(methodName)) { PsiType res = findTypeForIteration(qualifier, expression); if (params.length == 2 && res != null) { if (index == 0) { return res; } return TypesUtil.createTypeByFQClassName(JAVA_LANG_INTEGER, expression); } if (InheritanceUtil.isInheritor(type, JAVA_UTIL_MAP)) { if (params.length == 2) { if (index == 0) { return getEntryForMap(type, expression.getProject(), expression.getResolveScope()); } return TypesUtil.createTypeByFQClassName(JAVA_LANG_INTEGER, expression); } if (params.length == 3) { if (index == 0) { return PsiUtil.substituteTypeParameter(type, JAVA_UTIL_MAP, 0, true); } if (index == 1) { return PsiUtil.substituteTypeParameter(type, JAVA_UTIL_MAP, 1, true); } return TypesUtil.createTypeByFQClassName(JAVA_LANG_INTEGER, expression); } } } else if (GdkMethodUtil.INJECT.equals(methodName) && params.length == 2) { if (index == 0) { return TypesUtil.createTypeByFQClassName(JAVA_LANG_OBJECT, expression); } PsiType res = findTypeForIteration(qualifier, expression); if (res != null) { return res; } if (InheritanceUtil.isInheritor(type, JAVA_UTIL_MAP)) { return getEntryForMap(type, expression.getProject(), expression.getResolveScope()); } } else if (GdkMethodUtil.EACH_PERMUTATION.equals(methodName) && params.length == 1) { final PsiType itemType = findTypeForIteration(qualifier, expression); if (itemType != null) { return JavaPsiFacade.getElementFactory(expression.getProject()).createTypeFromText( JAVA_UTIL_ARRAY_LIST + "<" + itemType.getCanonicalText() + ">", expression); } return TypesUtil.createTypeByFQClassName(JAVA_UTIL_ARRAY_LIST, expression); } else if (GdkMethodUtil.WITH_DEFAULT.equals(methodName)) { if (params.length == 1 && InheritanceUtil.isInheritor(type, JAVA_UTIL_MAP)) { return PsiUtil.substituteTypeParameter(type, JAVA_UTIL_MAP, 0, true); } } else if (GdkMethodUtil.SORT.equals(methodName)) { if (params.length < 3) { return findTypeForIteration(qualifier, expression); } } else if (GdkMethodUtil.WITH_STREAM.equals(methodName)) { final PsiMethod method = ((GrMethodCall)parent).resolveMethod(); if (method instanceof GrGdkMethod) { return qualifier.getType(); } else if (method != null) { final PsiParameter[] parameters = method.getParameterList().getParameters(); if (parameters.length > 0) { return parameters[0].getType(); } } } else if (GdkMethodUtil.WITH_STREAMS.equals(methodName)) { if (index == 0) { return TypesUtil.createTypeByFQClassName("java.io.InputStream", expression); } else if (index == 1) return TypesUtil.createTypeByFQClassName("java.io.OutputStream", expression); } else if (GdkMethodUtil.WITH_OBJECT_STREAMS.equals(methodName)) { if (index == 0) { return TypesUtil.createTypeByFQClassName("java.io.ObjectInputStream", expression); } else if (index == 1) return TypesUtil.createTypeByFQClassName("java.io.ObjectOutputStream", expression); } return null; } | inferType |
36,159 | PsiType (@Nullable PsiType map, @NotNull final Project project, @NotNull final GlobalSearchScope scope) { PsiType key = PsiUtil.substituteTypeParameter(map, JAVA_UTIL_MAP, 0, true); PsiType value = PsiUtil.substituteTypeParameter(map, JAVA_UTIL_MAP, 1, true); final PsiElementFactory factory = JavaPsiFacade.getElementFactory(project); final PsiClass entryClass = JavaPsiFacade.getInstance(project).findClass(JAVA_UTIL_MAP_ENTRY, scope); if (entryClass == null) { if (key != null && key != PsiTypes.nullType() && value != null && value != PsiTypes.nullType()) { final String text = String.format("%s<%s,%s>", JAVA_UTIL_MAP_ENTRY, key.getCanonicalText(), value.getCanonicalText()); return factory.createTypeFromText(text, null); } else { return factory.createTypeByFQClassName(JAVA_UTIL_MAP_ENTRY, scope); } } else { return factory.createType(entryClass, key, value); } } | getEntryForMap |
36,160 | PsiType (@NotNull GrExpression qualifier, @NotNull PsiElement context) { PsiType iterType = qualifier.getType(); if (iterType == null) return null; final PsiType type = findTypeForIteration(iterType, context); if (type == null) return null; return PsiImplUtil.normalizeWildcardTypeByPosition(type, qualifier); } | findTypeForIteration |
36,161 | PsiType (@Nullable PsiType type, @NotNull PsiElement context) { final PsiManager manager = context.getManager(); final GlobalSearchScope resolveScope = context.getResolveScope(); if (type instanceof PsiArrayType) { return TypesUtil.boxPrimitiveType(((PsiArrayType)type).getComponentType(), manager, resolveScope); } if (type instanceof GrTupleType) { PsiType[] types = ((GrTupleType)type).getParameters(); return types.length == 1 ? types[0] : null; } if (type instanceof GrRangeType) { return ((GrRangeType)type).getIterationType(); } PsiType fromIterator = findTypeFromIteratorMethod(type, context); if (fromIterator != null) { return fromIterator; } PsiType extracted = PsiUtil.extractIterableTypeParameter(type, true); if (extracted != null) { return extracted; } if (TypesUtil.isClassType(type, JAVA_LANG_STRING, JAVA_IO_FILE)) { return PsiType.getJavaLangString(manager, resolveScope); } if (InheritanceUtil.isInheritor(type, JAVA_UTIL_MAP)) { return getEntryForMap(type, manager.getProject(), resolveScope); } return type; } | findTypeForIteration |
36,162 | PsiType (@Nullable PsiType type, PsiElement context) { if (!(type instanceof PsiClassType)) return null; final GroovyResolveResult[] candidates = ResolveUtil.getMethodCandidates(type, "iterator", context, PsiType.EMPTY_ARRAY); final GroovyResolveResult candidate = PsiImplUtil.extractUniqueResult(candidates); final PsiElement element = candidate.getElement(); if (!(element instanceof PsiMethod)) return null; final PsiType returnType = org.jetbrains.plugins.groovy.lang.psi.util.PsiUtil.getSmartReturnType((PsiMethod)element); final PsiType iteratorType = candidate.getSubstitutor().substitute(returnType); return PsiUtil.substituteTypeParameter(iteratorType, JAVA_UTIL_ITERATOR, 0, false); } | findTypeFromIteratorMethod |
36,163 | String (@NotNull GrMethodCall methodCall) { GrExpression expression = methodCall.getInvokedExpression(); if (expression instanceof GrReferenceExpression) { return ((GrReferenceExpression)expression).getReferenceName(); } return null; } | findMethodName |
36,164 | void ( GrParameter parameter, PsiSubstitutor substitutor, TypePresentation typePresentation, StringBuilder builder, boolean doHighlighting ) { if (presentNamedParameters(builder, parameter, doHighlighting)) return; for (PsiAnnotation annotation : parameter.getModifierList().getAnnotations()) { appendStyledSpan(doHighlighting, builder, GroovySyntaxHighlighter.ANNOTATION, annotation.getText()); builder.append(' '); } PsiType type = parameter.getTypeGroovy(); type = substitutor.substitute(type); if (typePresentation == TypePresentation.LINK) { if (type != null) { StringBuilder typeBuilder = new StringBuilder(); JavaDocInfoGeneratorFactory.create(parameter.getProject(), null).generateType(typeBuilder, type, parameter); if (doHighlighting) { builder.append(typeBuilder); } else { builder.append(StringUtil.removeHtmlTags(typeBuilder.toString(), true)); } } else { appendStyledSpan(doHighlighting, builder, GroovySyntaxHighlighter.KEYWORD, GrModifier.DEF); } builder.append(' '); appendStyledSpan(doHighlighting, builder, GroovySyntaxHighlighter.PARAMETER, parameter.getName()); return; } if (type != null) { if (typePresentation == TypePresentation.PRESENTABLE) { builder.append(type.getPresentableText()).append(' ').append(parameter.getName()); } else if (typePresentation == TypePresentation.CANONICAL) { builder.append(type.getCanonicalText()).append(' ').append(parameter.getName()); } } else { builder.append(parameter.getName()); final Set<String> structural = Collections.synchronizedSet(new LinkedHashSet<>()); ReferencesSearch.search(parameter, parameter.getUseScope()).forEach(ref -> { PsiElement parent = ref.getElement().getParent(); if (parent instanceof GrReferenceExpression) { if (structural.size() >= CONSTRAINTS_NUMBER) { //handle too many constraints structural.add("..."); return false; } StringBuilder builder1 = new StringBuilder(); builder1.append(((GrReferenceElement<?>)parent).getReferenceName()); PsiType[] argTypes = PsiUtil.getArgumentTypes(parent, true); if (argTypes != null) { builder1.append("("); builder1.append(GroovyBundle.message("parameter.hint.number.of.arguments", argTypes.length)); builder1.append(')'); } structural.add(builder1.toString()); } return true; }); if (!structural.isEmpty()) { builder.append("."); String[] array = ArrayUtilRt.toStringArray(structural); if (array.length > 1) builder.append("["); for (int i = 0; i < array.length; i++) { if (i > 0) builder.append(", "); builder.append(array[i]); } if (array.length > 1) builder.append("]"); } } } | appendParameterPresentation |
36,165 | String (MethodSignature signature) { StringBuilder builder = new StringBuilder(); builder.append(signature.getName()).append('('); PsiType[] types = signature.getParameterTypes(); for (PsiType type : types) { builder.append(type.getPresentableText()).append(", "); } if (types.length > 0) builder.delete(builder.length() - 2, builder.length()); builder.append(")"); return builder.toString(); } | getSignaturePresentation |
36,166 | StringBuilder ( boolean doHighlighting, @NotNull StringBuilder buffer, @NotNull TextAttributesKey attributesKey, @Nullable String value ) { if (doHighlighting) { HtmlSyntaxInfoUtil.appendStyledSpan(buffer, attributesKey, value, DocumentationSettings.getHighlightingSaturation(false)); } else { buffer.append(value); } return buffer; } | appendStyledSpan |
36,167 | boolean (@NotNull StringBuilder buffer, @NotNull GrParameter parameter, boolean doHighlighting) { List<NamedParamData> pairs = NamedParamsUtil.collectNamedParams(parameter); for (int i = 0; i < pairs.size(); i++) { NamedParamData namedParam = pairs.get(i); appendStyledSpan(doHighlighting, buffer, GroovySyntaxHighlighter.PARAMETER, namedParam.getName()); appendStyledSpan(doHighlighting, buffer, JavaHighlightingColors.OPERATION_SIGN, ": "); appendStyledSpan(doHighlighting, buffer, GroovySyntaxHighlighter.CLASS_REFERENCE, namedParam.getType().getPresentableText()); if (i != pairs.size() - 1) { appendStyledSpan(doHighlighting, buffer, JavaHighlightingColors.COMMA, ", "); } } return !pairs.isEmpty(); } | presentNamedParameters |
36,168 | void () { stateStack.clear(); } | resetState |
36,169 | void (int... states) { assert states.length > 0; for (int state : states) { assert state != getInitialState(); stateStack.push(state); yybegin(state); } } | yybeginstate |
36,170 | void (int... states) { for (int state : states) { assert state != getInitialState(); assert !stateStack.isEmpty() : stateStack; int previous = stateStack.pop(); assert previous == state : "States does not match: previous=" + previous + ", expected=" + state; } yybegin(stateStack.isEmpty() ? getInitialState() : stateStack.peek()); } | yyendstate |
36,171 | IElementType (IElementType tokenType) { if (indexOf(getDivisionStates(), yystate()) != -1 && DIVISION_IS_EXPECTED_AFTER.contains(tokenType)) { yybeginstate(getDivisionExpectedState()); } return tokenType; } | storeToken |
36,172 | void () { final IElementType tokenType = getDelegate().getTokenType(); if (tokenType == GroovyTokenTypes.mIDENT || TokenSets.KEYWORDS.contains(tokenType)) { addOccurrenceInToken(UsageSearchContext.IN_CODE); } else if (TokenSets.STRING_LITERALS.contains(tokenType)) { scanWordsInToken(UsageSearchContext.IN_STRINGS | UsageSearchContext.IN_FOREIGN_LANGUAGES, false, true); } else if (TokenSets.COMMENT_SET.contains(tokenType)) { scanWordsInToken(UsageSearchContext.IN_COMMENTS, false, false); advanceTodoItemCountsInToken(); } else { scanWordsInToken(UsageSearchContext.IN_PLAIN_TEXT, false, false); } getDelegate().advance(); } | advance |
36,173 | boolean () { return myLeftBound; } | isLeftBound |
36,174 | GroovyScriptType () { return myScriptType; } | getScriptType |
36,175 | GroovyScriptType (@NotNull GroovyFile file) { for (GroovyScriptTypeDetector detector : EP_NAME.getExtensions()) { if (detector.isSpecificScriptFile(file)) { return detector.getScriptType(); } } return null; } | getScriptType |
36,176 | boolean (@NotNull GroovyFile file) { return file.isScript() && getScriptType(file) != null; } | isScriptFile |
36,177 | Icon (@NotNull GroovyFile file) { GroovyScriptType scriptType = getScriptType(file); return scriptType == null ? JetgroovyIcons.Groovy.GroovyFile : scriptType.getScriptIcon(); } | getIcon |
36,178 | GlobalSearchScope (@NotNull GroovyFile script, @NotNull GlobalSearchScope scope) { GroovyScriptType scriptType = getScriptType(script); return scriptType == null ? scope : scriptType.patchResolveScope(script, scope); } | patchResolveScope |
36,179 | void (@NotNull PluginDescriptor pluginDescriptor) { myPluginDescriptor = pluginDescriptor; } | setPluginDescriptor |
36,180 | ClassLoader () { return myPluginDescriptor != null ? myPluginDescriptor.getClassLoader() : getClass().getClassLoader(); } | getLoaderForClass |
36,181 | void () { synchronized (GroovyMethodInfo.class) { METHOD_INFOS = null; LIGHT_METHOD_INFOS = null; } } | dropCaches |
36,182 | void () { if (METHOD_INFOS != null) return; synchronized (GroovyMethodInfo.class) { Map<String, Map<String, List<GroovyMethodInfo>>> methodInfos = new HashMap<>(); Map<String, Map<String, List<GroovyMethodInfo>>> lightMethodInfos = new HashMap<>(); GroovyClassDescriptor.EP_NAME.processWithPluginDescriptor((classDescriptor, pluginDescriptor) -> { ClassLoader classLoader = pluginDescriptor.getClassLoader(); for (GroovyMethodDescriptor method : classDescriptor.methods) { addMethodDescriptor(methodInfos, method, classLoader, classDescriptor.className); } return Unit.INSTANCE; }); for (GroovyMethodDescriptorExtension methodDescriptor : GroovyMethodDescriptorExtension.EP_NAME.getExtensions()) { if (methodDescriptor.className != null) { assert methodDescriptor.lightMethodKey == null; addMethodDescriptor(methodInfos, methodDescriptor, methodDescriptor.getLoaderForClass(), methodDescriptor.className); } else { addMethodDescriptor(lightMethodInfos, methodDescriptor, methodDescriptor.getLoaderForClass(), methodDescriptor.lightMethodKey); } } processUnnamedDescriptors(lightMethodInfos); processUnnamedDescriptors(methodInfos); LIGHT_METHOD_INFOS = lightMethodInfos; METHOD_INFOS = methodInfos; } } | ensureInit |
36,183 | void (Map<String, Map<String, List<GroovyMethodInfo>>> map) { for (Map<String, List<GroovyMethodInfo>> methodMap : map.values()) { List<GroovyMethodInfo> unnamedMethodDescriptors = methodMap.get(null); if (unnamedMethodDescriptors != null) { for (Map.Entry<String, List<GroovyMethodInfo>> entry : methodMap.entrySet()) { if (entry.getKey() != null) { entry.getValue().addAll(unnamedMethodDescriptors); } } } } } | processUnnamedDescriptors |
36,184 | List<GroovyMethodInfo> (Map<String, Map<String, List<GroovyMethodInfo>>> map, String key, PsiMethod method) { Map<String, List<GroovyMethodInfo>> methodMap = map.get(key); if (methodMap == null) return null; List<GroovyMethodInfo> res = methodMap.get(method.getName()); if (res == null) { res = methodMap.get(null); } return res; } | getInfos |
36,185 | List<GroovyMethodInfo> (PsiMethod method) { ensureInit(); List<GroovyMethodInfo> lightMethodInfos = null; Object methodKind = GrLightMethodBuilder.getMethodKind(method); if (methodKind instanceof String) { lightMethodInfos = getInfos(LIGHT_METHOD_INFOS, (String)methodKind, method); } if (method instanceof PsiMirrorElement) { PsiElement prototype = ((PsiMirrorElement)method).getPrototype(); if (prototype instanceof PsiMethod) { method = (PsiMethod)prototype; } } List<GroovyMethodInfo> methodInfos = null; PsiClass containingClass = method.getContainingClass(); if (containingClass != null) { methodInfos = getInfos(METHOD_INFOS, containingClass.getQualifiedName(), method); } if (methodInfos == null) { return lightMethodInfos == null ? Collections.emptyList() : lightMethodInfos; } else { if (lightMethodInfos == null) { return methodInfos; } else { return ContainerUtil.concat(lightMethodInfos, methodInfos); } } } | getInfos |
36,186 | void (@Nullable String className, Class<?> ... types) { if (className == null) return; try { Class<?> aClass = myClassLoader.loadClass(className); for (Class<?> t : types) { if (t.isAssignableFrom(aClass)) return; } assert false : "Incorrect class type: " + aClass + " must be one of " + Arrays.asList(types); assert Modifier.isPublic(aClass.getConstructor(ArrayUtil.EMPTY_CLASS_ARRAY).getModifiers()); } catch (Exception e) { throw new RuntimeException(e); } } | assertClassExists |
36,187 | GroovyMethodDescriptor () { return myDescriptor; } | getDescriptor |
36,188 | void (Map<String, Map<String, List<GroovyMethodInfo>>> res, GroovyMethodDescriptor method, @NotNull ClassLoader classLoader, @NotNull String key) { if (method.methodName == null) { addMethodDescriptor(res, method, classLoader, null, key); } else { for (StringTokenizer st = new StringTokenizer(method.methodName, " \t,;"); st.hasMoreTokens(); ) { String name = st.nextToken(); assert GroovyNamesUtil.isIdentifier(name); addMethodDescriptor(res, method, classLoader, name, key); } } } | addMethodDescriptor |
36,189 | void (Map<String, Map<String, List<GroovyMethodInfo>>> res, GroovyMethodDescriptor method, @NotNull ClassLoader classLoader, @Nullable String methodName, @NotNull String key) { Map<String, List<GroovyMethodInfo>> methodMap = res.get(key); if (methodMap == null) { methodMap = new HashMap<>(); res.put(key, methodMap); } List<GroovyMethodInfo> methodsList = methodMap.get(methodName); if (methodsList == null) { methodsList = new ArrayList<>(); methodMap.put(methodName, methodsList); } methodsList.add(new GroovyMethodInfo(method, classLoader)); } | addMethodDescriptor |
36,190 | String () { return myReturnType; } | getReturnType |
36,191 | boolean () { return myReturnTypeCalculatorClassName != null; } | isReturnTypeCalculatorDefined |
36,192 | Set<String> () { ensureInit(); return myAllSupportedNamedArguments; } | getAllSupportedNamedArguments |
36,193 | Object (String namedArgumentName) { NamedArgumentReference r = myNamedArgReferenceProviders.get(namedArgumentName); if (r == null) return null; return r.getProvider(myClassLoader); } | getNamedArgReferenceProvider |
36,194 | boolean () { return myNamedArgProviderClassName != null; } | isNamedArgumentProviderDefined |
36,195 | GroovyNamedArgumentProvider () { if (myNamedArgProviderInstance == null) { myNamedArgProviderInstance = SingletonInstancesCache.getInstance(myNamedArgProviderClassName, myClassLoader); } return myNamedArgProviderInstance; } | getNamedArgProvider |
36,196 | ClassLoader () { return myClassLoader; } | getPluginClassLoader |
36,197 | boolean (@NotNull PsiMethod method) { if (myParams == null) { return true; } PsiParameterList parameterList = method.getParameterList(); if (parameterList.getParametersCount() != myParams.size()) return false; PsiParameter[] parameters = parameterList.getParameters(); for (int i = 0; i < parameters.length; i++) { if (!TypesUtil.isClassType(parameters[i].getType(), myParams.get(i))) { return false; } } return true; } | isApplicable |
36,198 | Object (ClassLoader classLoader) { if (myProviderClassName != null) { return SingletonInstancesCache.getInstance(myProviderClassName, classLoader); } return new FixedValuesReferenceProvider(myValues); } | doGetProvider |
36,199 | Object (ClassLoader classLoader) { Object res = myProvider; if (res == null) { res = doGetProvider(classLoader); myProvider = res; } return res; } | getProvider |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.