Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
13,000 | boolean (Collection<String> alreadyExistingFieldNames) { return !alreadyExistingFieldNames.contains(fieldInBuilderName); } | notAlreadyExistingField |
13,001 | boolean (Collection<String> alreadyExistedMethodNames) { return !alreadyExistedMethodNames.contains(calcBuilderMethodName()); } | notAlreadyExistingMethod |
13,002 | Project () { return variableInClass.getProject(); } | getProject |
13,003 | PsiManager () { return variableInClass.getManager(); } | getManager |
13,004 | String () { return fieldInBuilderName; } | getFieldName |
13,005 | CapitalizationStrategy () { return capitalizationStrategy; } | getCapitalizationStrategy |
13,006 | LombokNullAnnotationLibrary () { return nullAnnotationLibrary; } | getNullAnnotationLibrary |
13,007 | PsiType () { return fieldInBuilderType; } | getFieldType |
13,008 | PsiVariable () { return variableInClass; } | getVariable |
13,009 | boolean () { return deprecated; } | isDeprecated |
13,010 | String () { return visibilityModifier; } | getVisibilityModifier |
13,011 | String () { return setterPrefix; } | getSetterPrefix |
13,012 | PsiClass () { return builderClass; } | getBuilderClass |
13,013 | PsiType () { return builderClassType; } | getBuilderType |
13,014 | String () { return builderChainResult; } | getBuilderChainResult |
13,015 | PsiAnnotation () { return singularAnnotation; } | getSingularAnnotation |
13,016 | boolean () { return null != singularAnnotation; } | hasSingularAnnotation |
13,017 | boolean () { return hasBuilderDefaultAnnotation; } | hasBuilderDefaultAnnotation |
13,018 | boolean () { return null == fieldInitializer; } | hasNoInitializer |
13,019 | boolean () { return null != obtainViaAnnotation; } | hasObtainViaAnnotation |
13,020 | PsiExpression () { return fieldInitializer; } | getFieldInitializer |
13,021 | String () { return viaFieldName; } | getViaFieldName |
13,022 | String () { return viaMethodName; } | getViaMethodName |
13,023 | boolean () { return viaStaticCall; } | isViaStaticCall |
13,024 | String () { return instanceVariableName; } | getInstanceVariableName |
13,025 | Collection<String> () { if (deprecated) { return Collections.singleton(CommonClassNames.JAVA_LANG_DEPRECATED); } return Collections.emptyList(); } | getAnnotations |
13,026 | Collection<PsiField> () { return builderElementHandler.renderBuilderFields(this); } | renderBuilderFields |
13,027 | String () { return builderElementHandler.calcBuilderMethodName(this); } | calcBuilderMethodName |
13,028 | Collection<PsiMethod> () { return builderElementHandler.renderBuilderMethod(this); } | renderBuilderMethods |
13,029 | String () { return builderElementHandler.renderBuildPrepare(this); } | renderBuildPrepare |
13,030 | String () { return builderElementHandler.renderBuildCall(this); } | renderBuildCall |
13,031 | String () { return builderElementHandler.renderSuperBuilderConstruction(variableInClass, fieldInBuilderName); } | renderSuperBuilderConstruction |
13,032 | String () { return hasBuilderDefaultAnnotation ? fieldInBuilderName + "$value" : fieldInBuilderName; } | renderFieldName |
13,033 | String () { return hasBuilderDefaultAnnotation ? fieldInBuilderName + "$set" : null; } | renderFieldDefaultSetName |
13,034 | String () { return hasBuilderDefaultAnnotation ? "$default$" + fieldInBuilderName : null; } | renderFieldDefaultProviderName |
13,035 | CharSequence () { if (hasObtainViaAnnotation() && StringUtil.isNotEmpty(viaMethodName)) { final StringBuilder result = new StringBuilder(); result.append(PsiModifier.FINAL); result.append(' '); result.append(fieldInBuilderType.getCanonicalText(false)); result.append(' '); result.append(fieldInBuilderName); result.appen... | renderToBuilderPrependStatement |
13,036 | CharSequence () { return renderToBuilderCall(true); } | renderToBuilderCallWithPrependLogic |
13,037 | CharSequence () { return renderToBuilderCall(false); } | renderToBuilderCallWithoutPrependLogic |
13,038 | CharSequence (boolean usePrependLogic) { if (hasObtainViaAnnotation()) { final StringBuilder result = new StringBuilder(); result.append(fieldInBuilderName); result.append('('); if (StringUtil.isNotEmpty(viaFieldName)) { result.append(instanceVariableName).append(".").append(viaFieldName); } else if (StringUtil.isNotEm... | renderToBuilderCall |
13,039 | CharSequence () { return builderElementHandler.renderToBuilderAppendCall(this); } | renderToBuilderAppendStatement |
13,040 | PsiClass () { return builderClass.getContainingClass(); } | getPsiClass |
13,041 | Optional<PsiType> () { PsiVariable psiVariable = variableInClass; if (StringUtil.isNotEmpty(viaFieldName)) { final PsiField fieldByName = getPsiClass().findFieldByName(viaFieldName, false); if (fieldByName != null) { psiVariable = fieldByName; } } final PsiType psiVariableType = psiVariable.getType(); if (psiVariableTy... | getObtainViaFieldVariableType |
13,042 | void (String instanceVariableName) { this.instanceVariableName = instanceVariableName; } | withInstanceVariableName |
13,043 | PsiField () { return psiField; } | getField |
13,044 | boolean () { return psiField != null; } | isField |
13,045 | PsiMethod () { return psiMethod; } | getMethod |
13,046 | String () { return memberName; } | getName |
13,047 | PsiType () { if (null != psiField) { return psiField.getType(); } return psiMethod.getReturnType(); } | getType |
13,048 | boolean (String fieldName) { if (null != psiField && defaultInclude) { return fieldName.equals(psiField.getName()); } return false; } | matchDefaultIncludedFieldName |
13,049 | int (@NotNull MemberInfo other) { return Integer.compare(other.rankValue, rankValue); } | compareTo |
13,050 | Collection<MemberInfo> (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, boolean filterTransient, String includeAnnotationProperty, @Nullable ConfigKey onlyExplicitlyIncludedConfigKey, @NotNull String annotationIncludeFQN, @NotNull String annotationExcludeFQN) { final boolean explicitOf = PsiAnnotation... | filterMembers |
13,051 | boolean (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @Nullable ConfigKey onlyExplicitlyIncludedConfigKey) { final boolean onlyExplicitlyIncluded; final Boolean declaredAnnotationValue = PsiAnnotationUtil.getDeclaredBooleanAnnotationValue(psiAnnotation, "onlyExplicitlyIncluded"); if (null == declar... | checkOnlyExplicitlyIncluded |
13,052 | int (@NotNull PsiAnnotation includeAnnotation) { return PsiAnnotationUtil.getIntAnnotationValue(includeAnnotation, TO_STRING_RANK_ANNOTATION_PARAMETER, 0); } | calcMemberRank |
13,053 | String (@NotNull MemberInfo memberInfo, boolean doNotUseGetters, @NotNull PsiClass psiClass) { final String memberAccessor; if (null == memberInfo.getMethod()) { memberAccessor = buildAttributeNameString(doNotUseGetters, memberInfo.getField(), psiClass); } else { memberAccessor = memberInfo.getName() + "()"; } return m... | getMemberAccessorName |
13,054 | String (boolean doNotUseGetters, @NotNull PsiField classField, @NotNull PsiClass psiClass) { final String fieldName = classField.getName(); if (doNotUseGetters) { return fieldName; } else { final String getterName = LombokUtils.getGetterName(classField); final boolean hasGetter; final boolean annotatedWith = PsiAnnotat... | buildAttributeNameString |
13,055 | Collection<String> (@NotNull Collection<String> exclude) { if (exclude.isEmpty()) { return Collections.emptySet(); } else { return new HashSet<>(exclude); } } | makeSet |
13,056 | String (@NotNull PsiClass containingClass, @NotNull PsiAnnotation fieldNameConstants) { String typeName = PsiAnnotationUtil.getStringAnnotationValue(fieldNameConstants, "innerTypeName", ""); if (StringUtil.isEmptyOrSpaces(typeName)) { final ConfigDiscovery configDiscovery = ConfigDiscovery.getInstance(); typeName = con... | getTypeName |
13,057 | LombokLightClassBuilder (@NotNull String name, @NotNull PsiClass containingClass, @NotNull PsiAnnotation psiAnnotation) { final String accessLevel = LombokProcessorUtil.getLevelVisibility(psiAnnotation); if (accessLevel == null) { return null; } final boolean asEnum = PsiAnnotationUtil.getBooleanAnnotationValue(psiAnno... | createInnerClassOrEnum |
13,058 | boolean (@NotNull PsiClass containingClass) { final ConfigDiscovery configDiscovery = ConfigDiscovery.getInstance(); return configDiscovery.getBooleanLombokConfigProperty(ConfigKey.FIELD_NAME_CONSTANTS_UPPERCASE, containingClass); } | useUppercasedConstants |
13,059 | List<PsiField> (@NotNull PsiClass containingClass, @NotNull Collection<PsiMember> psiMembers) { final Set<String> existingFieldNames = PsiClassUtil.collectClassFieldsIntern(containingClass).stream().map(PsiField::getName).collect(Collectors.toSet()); final PsiElementFactory psiElementFactory = JavaPsiFacade.getElementF... | createFields |
13,060 | LombokLightClassBuilder (@NotNull String name, @NotNull PsiClass containingClass, @NotNull String accessLevel, @NotNull PsiElement navigationElement) { final String innerClassQualifiedName = containingClass.getQualifiedName() + "." + name; final LombokLightClassBuilder lazyClassBuilder = new LombokLightClassBuilder(con... | createEnum |
13,061 | PsiField (@NotNull PsiMember psiMember, boolean makeUppercased, @NotNull PsiClass containingClass, PsiClassType classType) { return new LombokEnumConstantBuilder(containingClass.getManager(), makeFieldNameConstant(psiMember, makeUppercased), classType) .withContainingClass(containingClass) .withModifier(PsiModifier.PUB... | createEnumConstant |
13,062 | String (@NotNull PsiMember psiMember, boolean makeUppercased) { final String fieldName = psiMember.getName(); return makeUppercased ? LombokUtils.camelCaseToConstant(fieldName) : fieldName; } | makeFieldNameConstant |
13,063 | LombokLightClassBuilder (@NotNull String name, @NotNull PsiClass containingClass, @NotNull String accessLevel, @NotNull PsiElement navigationElement) { final String innerClassQualifiedName = containingClass.getQualifiedName() + "." + name; final LombokLightClassBuilder lazyClassBuilder = new LombokLightClassBuilder(con... | createInnerClass |
13,064 | PsiField (@NotNull PsiMember psiMember, boolean makeUppercased, @NotNull PsiClass containingClass) { final PsiManager manager = containingClass.getContainingFile().getManager(); final PsiType fieldNameConstType = PsiType.getJavaLangString(manager, GlobalSearchScope.allScope(containingClass.getProject())); LombokLightFi... | createFieldNameConstant |
13,065 | boolean (@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull PsiType psiType, @NotNull PsiAnnotation psiAnnotation, @NotNull ProblemSink problemSink) { boolean result = true; if (psiModifierListOwner.hasModifierProperty(PsiModifier.STATIC)) { problemSink.addErrorMessage("inspection.message.delegate.legal.only.... | validate |
13,066 | Collection<PsiType> (PsiAnnotation psiAnnotation, PsiType psiType) { Collection<PsiType> types = PsiAnnotationUtil.getAnnotationValues(psiAnnotation, "types", PsiType.class); if (types.isEmpty()) { types = Collections.singletonList(psiType); } return types; } | collectDelegateTypes |
13,067 | boolean (Collection<PsiType> psiTypes, ProblemSink problemSink) { boolean result = true; for (PsiType psiType : psiTypes) { if (!checkConcreteClass(psiType)) { problemSink.addErrorMessage("inspection.message.delegate.can.only.use.concrete.class.types", psiType.getCanonicalText()); result = false; } else { result &= val... | validateTypes |
13,068 | boolean (PsiType psiType, ProblemSink problemSink) { final PsiClass psiClass = PsiTypesUtil.getPsiClass(psiType); if (null != psiClass) { final DelegateAnnotationElementVisitor delegateAnnotationElementVisitor = new DelegateAnnotationElementVisitor(psiType, problemSink); psiClass.acceptChildren(delegateAnnotationElemen... | validateRecursion |
13,069 | boolean (@NotNull PsiType psiType) { if (psiType instanceof PsiClassType) { PsiClass psiClass = ((PsiClassType)psiType).resolve(); return !(psiClass instanceof PsiTypeParameter); } return false; } | checkConcreteClass |
13,070 | Collection<PsiType> (PsiAnnotation psiAnnotation) { return PsiAnnotationUtil.getAnnotationValues(psiAnnotation, "excludes", PsiType.class); } | collectExcludeTypes |
13,071 | void (Collection<PsiType> types, Collection<Pair<PsiMethod, PsiSubstitutor>> results) { for (PsiType type : types) { addMethodsOfType(type, results); } } | addMethodsOfTypes |
13,072 | void (PsiType psiType, Collection<Pair<PsiMethod, PsiSubstitutor>> results) { final PsiClassType.ClassResolveResult resolveResult = PsiUtil.resolveGenericsClassInType(psiType); final PsiClass psiClass = resolveResult.getElement(); if (null != psiClass && psiType instanceof PsiClassType psiClassType) { final PsiTypePara... | addMethodsOfType |
13,073 | void (@NotNull PsiExtensibleClass psiStartClass, Collection<Pair<PsiMethod, PsiSubstitutor>> results) { PsiExtensibleClass psiClass = psiStartClass; do { for (PsiMethod psiMethod : psiClass.getOwnMethods()) { if (isAcceptableMethod(psiMethod)) { if (!isAlreadyPresent(psiMethod, PsiSubstitutor.EMPTY, results)) { results... | collectAllOwnMethods |
13,074 | boolean (PsiMethod psiMethod) { return !psiMethod.isConstructor() && psiMethod.hasModifierProperty(PsiModifier.PUBLIC) && !psiMethod.hasModifierProperty(PsiModifier.STATIC); } | isAcceptableMethod |
13,075 | boolean (PsiMethod psiMethod, PsiSubstitutor psiSubstitutor, Collection<Pair<PsiMethod, PsiSubstitutor>> searchedPairs) { boolean acceptMethod = true; for (Pair<PsiMethod, PsiSubstitutor> someMethodPair : searchedPairs) { if (methodMatches(psiMethod, psiSubstitutor, someMethodPair.getFirst(), someMethodPair.getSecond()... | isAlreadyPresent |
13,076 | boolean (@NotNull PsiMethod firstMethod, @NotNull PsiSubstitutor firstSubstitutor, @NotNull PsiMethod secondMethod, @NotNull PsiSubstitutor secondSubstitutor) { if (!firstMethod.getName().equals(secondMethod.getName())) { return false; } PsiParameterList firstMethodParameterList = firstMethod.getParameterList(); PsiPar... | methodMatches |
13,077 | void (@NotNull PsiField psiField) { checkModifierListOwner(psiField); } | visitField |
13,078 | void (@NotNull PsiMethod psiMethod) { checkModifierListOwner(psiMethod); } | visitMethod |
13,079 | void (PsiModifierListOwner modifierListOwner) { if (PsiAnnotationSearchUtil.isAnnotatedWith(modifierListOwner, LombokClassNames.DELEGATE, LombokClassNames.EXPERIMENTAL_DELEGATE)) { builder.addErrorMessage("inspection.message.delegate.does.not.support.recursion.delegating", ((PsiMember)modifierListOwner).getName(), psiT... | checkModifierListOwner |
13,080 | boolean () { return valid; } | isValid |
13,081 | boolean (@NotNull PsiClass psiClass, Collection<BuilderInfo> builderInfos, @NotNull ProblemSink problemSink) { return true; } | validateBuilderConstructor |
13,082 | boolean (@NotNull String builderClassName, @NotNull PsiClass psiClass, @NotNull ProblemSink problemSink) { final Optional<PsiClass> existingInnerBuilderClassOptional = PsiClassUtil.getInnerClassInternByName(psiClass, builderClassName); if (existingInnerBuilderClassOptional.isPresent()) { final PsiClass existingInnerBui... | validateExistingBuilderClass |
13,083 | String (@NotNull PsiClass psiClass) { return getBuilderClassName(psiClass, psiClass.getName()); } | getBuilderClassName |
13,084 | String (@NotNull PsiClass psiClass) { return getBuilderClassName(psiClass) + "Impl"; } | getBuilderImplClassName |
13,085 | Optional<PsiMethod> (@NotNull PsiClass psiClass, @NotNull PsiClass builderClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiClassType psiTypeBaseWithGenerics) { final String className = psiClass.getName(); if (null == className) { return Optional.empty(); } final Collection<PsiMethod> existedConstructors = PsiCl... | createBuilderBasedConstructor |
13,086 | Optional<PsiMethod> (@NotNull PsiClass containingClass, @NotNull PsiClass builderBaseClass, @NotNull PsiClass builderImplClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiClassType psiTypeBaseWithGenerics) { final String builderMethodName = getBuilderMethodName(psiAnnotation); if (builderMethodName.isEmpty() || ... | createBuilderMethodIfNecessary |
13,087 | Optional<PsiMethod> (@NotNull PsiClass containingClass, @NotNull PsiClass builderBaseClass, @NotNull PsiClass builderImplClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiClassType psiTypeBaseWithGenerics) { if (!shouldGenerateToBuilderMethods(psiAnnotation)) { return Optional.empty(); } final LombokLightMethodB... | createToBuilderMethodIfNecessary |
13,088 | boolean (@NotNull PsiAnnotation psiAnnotation) { return PsiAnnotationUtil.getBooleanAnnotationValue(psiAnnotation, TO_BUILDER_ANNOTATION_KEY, false); } | shouldGenerateToBuilderMethods |
13,089 | String (String classGenericName, Collection<String> typeParamStrings) { String result = classGenericName; if (typeParamStrings.contains(classGenericName)) { int counter = 2; do { result = classGenericName + counter++; } while (typeParamStrings.contains(result)); } return result; } | selectNonClashingNameFor |
13,090 | PsiClass (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation) { String builderClassName = getBuilderClassName(psiClass); String builderClassQualifiedName = psiClass.getQualifiedName() + "." + builderClassName; final LombokLightClassBuilder baseClassBuilder = new LombokLightClassBuilder(psiClass, builderCl... | createBuilderBaseClass |
13,091 | List<BuilderInfo> (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass baseClassBuilder) { final List<BuilderInfo> builderInfos = createBuilderInfos(psiAnnotation, psiClass, null, baseClassBuilder); for (BuilderInfo builderInfo : builderInfos) { builderInfo.withBuilderChainResult("self()... | createBuilderInfos |
13,092 | void (@NotNull List<BuilderInfo> builderInfos, @NotNull PsiClassType bType) { for (BuilderInfo builderInfo : builderInfos) { builderInfo.withBuilderClassType(bType); } } | initBuilderInfosBuilderClassType |
13,093 | Collection<PsiMethod> (@NotNull PsiClass psiParentClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass psiBuilderClass) { final PsiTypeParameter[] typeParameters = psiBuilderClass.getTypeParameters(); final PsiClass bTypeClass, cTypeClass; if (typeParameters.length >= 2) { bTypeClass = typeParameters[typePara... | createAllMethodsOfBaseBuilder |
13,094 | Collection<PsiMethod> (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass baseClassBuilder, List<BuilderInfo> builderInfos, @NotNull PsiClassType bType, @NotNull PsiClassType cType) { final Collection<PsiMethod> result = new ArrayList<>(); final Collection<String> existedMethodNames = P... | addAllMethodsForBaseBuilderClass |
13,095 | PsiClass (@NotNull PsiClass psiClass, @NotNull PsiClass psiBaseBuilderClass, PsiAnnotation psiAnnotation) { String builderClassName = getBuilderImplClassName(psiClass); String builderClassQualifiedName = psiClass.getQualifiedName() + "." + builderClassName; final LombokLightClassBuilder implClassBuilder = new LombokLig... | createBuilderImplClass |
13,096 | Collection<PsiMethod> (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass implBuilderClass) { Collection<PsiMethod> result = new ArrayList<>(); final Collection<String> existedMethodNames = ContainerUtil.map2Set(PsiClassUtil.collectClassMethodsIntern(implBuilderClass), PsiMethod::getNam... | createAllMethodsOfImplBuilder |
13,097 | PsiClassType (@NotNull PsiClass psiClass) { final PsiWildcardType wildcardType = PsiWildcardType.createUnbounded(psiClass.getManager()); return getTypeWithSpecificTypeParameters(psiClass, wildcardType, wildcardType); } | getTypeWithWildcardsForSuperBuilderTypeParameters |
13,098 | PsiClassType (@NotNull PsiClass psiClass, PsiType @NotNull ... psiTypes) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(psiClass.getProject()); final PsiTypeParameter[] classTypeParameters = psiClass.getTypeParameters(); final int substituteTypesCount = psiTypes.length; if (classTypeParamete... | getTypeWithSpecificTypeParameters |
13,099 | boolean (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiMethod psiMethod) { return BUILDER_ANNOTATION_SHORT_NAME.equals(getBuilderClassName(psiClass, psiAnnotation, psiMethod)) || PsiAnnotationSearchUtil.checkAnnotationHasOneOfFQNs(psiAnnotation, LombokClassNames.BUILDER); } | checkAnnotationFQN |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.