Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Thurner committed Aug 15, 2024
1 parent 730f00e commit c9962e4
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class EndpointAnalysis {

private List<UsedEndpoints> usedEndpoints;

private List<EndpointInformation> unusedEndpoints;

public EndpointAnalysis(List<UsedEndpoints> usedEndpoints, List<EndpointInformation> unusedEndpoints) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ private static void analyzeEndpoints() {
List<EndpointClassInformation> endpointClasses = mapper.readValue(new File(EndpointParser.ENDPOINT_PARSING_RESULT_PATH),
new TypeReference<List<EndpointClassInformation>>() {
});
List<RestCallFileInformation> restCallFiles = mapper.readValue(new File(EndpointParser.REST_CALL_PARSING_RESULT_PATH), new TypeReference<List<RestCallFileInformation>>() {
});
List<RestCallFileInformation> restCallFiles = mapper.readValue(new File(EndpointParser.REST_CALL_PARSING_RESULT_PATH),
new TypeReference<List<RestCallFileInformation>>() {
});

List<UsedEndpoints> endpointsAndMatchingRestCalls = new ArrayList<>();
List<EndpointInformation> unusedEndpoints = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

public class EndpointClassInformation {

private String filePath;

private String classRequestMapping;

private List<EndpointInformation> endpoints;

public EndpointClassInformation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

public class EndpointInformation {

private String requestMapping;

private String endpoint;

private String httpMethodAnnotation;

private String URI;

private String className;

private int line;

private List<String> otherAnnotations;

public EndpointInformation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ private static String extractClassRequestMapping(ClassOrInterfaceDeclaration jav
return singleMemberAnnotationExpr.getMemberValue().toString();
}
else if (annotation instanceof NormalAnnotationExpr normalAnnotationExpr) {
return normalAnnotationExpr.getPairs().stream().filter(pair -> "path".equals(pair.getNameAsString())).map(pair -> pair.getValue().toString())
.findFirst().orElse("");
return normalAnnotationExpr.getPairs().stream().filter(pair -> "path".equals(pair.getNameAsString())).map(pair -> pair.getValue().toString()).findFirst()
.orElse("");
}
return "";
}).orElse("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class RestCallAnalysis {

private List<RestCallWithMatchingEndpoint> restCallsWithMatchingEndpoints;

private List<RestCallInformation> restCallsWithoutMatchingEndpoints;

public RestCallAnalysis(List<RestCallWithMatchingEndpoint> restCallsWithMatchingEndpoints, List<RestCallInformation> restCallsWithoutMatchingEndpoints) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package de.tum.cit.endpointanalysis;

import com.fasterxml.jackson.annotation.JsonProperty;

public class RestCallFileInformation {

String fileName;

RestCallInformation[] restCalls;

public RestCallFileInformation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
public class RestCallInformation {

private String method;

private String url;

private int line;

private String fileName;

public RestCallInformation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
public class RestCallWithMatchingEndpoint {

private EndpointInformation matchingEndpoint;

private RestCallInformation restCallInformation;

private String filePath;

public RestCallWithMatchingEndpoint(EndpointInformation matchingEndpoint, RestCallInformation restCallInformation, String filePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
public class UsedEndpoints {

private EndpointInformation endpointInformation;

private List<RestCallInformation> matchingRestCalls;

private String filePath;

public UsedEndpoints(EndpointInformation endpointInformation, List<RestCallInformation> matchingRestCalls, String filePath) {
Expand Down

0 comments on commit c9962e4

Please sign in to comment.