Skip to content

Commit

Permalink
Apply formatter to LombokValueToRecord.java
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Apr 24, 2024
1 parent 78ee454 commit d2cf6af
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex
return cd;
}

assert cd.getType() != null:"Class type must not be null";
assert cd.getType() != null : "Class type must not be null";
Set<String> memberVariableNames = getMemberVariableNames(memberVariables);
if (implementsConflictingInterfaces(cd, memberVariableNames)) {
return cd;
Expand All @@ -115,12 +115,12 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex
private boolean isRelevantClass(J.ClassDeclaration classDeclaration) {
List<J.Annotation> allAnnotations = classDeclaration.getAllAnnotations();
return classDeclaration.getType() != null
&& !J.ClassDeclaration.Kind.Type.Record.equals(classDeclaration.getKind())
&& !allAnnotations.isEmpty()
&& allAnnotations.stream().allMatch(ann -> LOMBOK_VALUE_MATCHER.matches(ann) && (ann.getArguments() == null || ann.getArguments().isEmpty()))
&& !hasGenericTypeParameter(classDeclaration)
&& classDeclaration.getBody().getStatements().stream().allMatch(this::isRecordCompatibleField)
&& !hasIncompatibleModifier(classDeclaration);
&& !J.ClassDeclaration.Kind.Type.Record.equals(classDeclaration.getKind())
&& !allAnnotations.isEmpty()
&& allAnnotations.stream().allMatch(ann -> LOMBOK_VALUE_MATCHER.matches(ann) && (ann.getArguments() == null || ann.getArguments().isEmpty()))
&& !hasGenericTypeParameter(classDeclaration)
&& classDeclaration.getBody().getStatements().stream().allMatch(this::isRecordCompatibleField)
&& !hasIncompatibleModifier(classDeclaration);
}

/**
Expand Down Expand Up @@ -251,8 +251,8 @@ private boolean isMethodInvocationOnRecordTypeClassMember(J.MethodInvocation met
String classFqn = classType.getFullyQualifiedName();

return recordTypeToMembers.containsKey(classFqn)
&& methodName.startsWith(STANDARD_GETTER_PREFIX)
&& recordTypeToMembers.get(classFqn).contains(getterMethodNameToFluentMethodName(methodName));
&& methodName.startsWith(STANDARD_GETTER_PREFIX)
&& recordTypeToMembers.get(classFqn).contains(getterMethodNameToFluentMethodName(methodName));
}

private static boolean isClassExpression(@Nullable Expression expression) {
Expand Down Expand Up @@ -301,7 +301,7 @@ private static String memberVariablesToString(Set<String> memberVariables) {
}

private static JavaType.Class buildRecordType(J.ClassDeclaration classDeclaration) {
assert classDeclaration.getType() != null:"Class type must not be null";
assert classDeclaration.getType() != null : "Class type must not be null";
String className = classDeclaration.getType().getFullyQualifiedName();

return JavaType.ShallowClass.build(className)
Expand Down

0 comments on commit d2cf6af

Please sign in to comment.