Skip to content

Commit

Permalink
Make access scopes more uniform
Browse files Browse the repository at this point in the history
  • Loading branch information
jormundur00 committed Jan 17, 2025
1 parent 46c5398 commit 065061b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void addCall(String entry, String methodType, String call, String callLoc
callLocations.add(callLocation);
}

private MethodsByType getMethodsByType(String entry) {
public MethodsByType getMethodsByType(String entry) {
return this.callsByPathEntry.getOrDefault(entry, new MethodsByType());
}

Expand All @@ -131,7 +131,7 @@ public static String getEntryName(String path) {
return fileName;
}

public void printReportForEntry(String entry) {
private void printReportForEntry(String entry) {
System.out.println("Dynamic method usage detected in " + entry + ":");
MethodsByType methodsByType = getMethodsByType(entry);
for (String methodType : methodsByType.getMethodTypes()) {
Expand All @@ -146,7 +146,7 @@ public void printReportForEntry(String entry) {
}
}

public void dumpReportForEntry(String entry) {
private void dumpReportForEntry(String entry) {
String fileName = getEntryName(entry) + "_method_calls.json";
Path targetPath = NativeImageGenerator.generatedFiles(HostedOptionValues.singleton()).resolve(fileName);
try (var writer = new JsonPrettyWriter(targetPath)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
*/

public class DynamicAccessDetectionPhase extends BasePhase<CoreProviders> {
public static final String METHODTYPE_REFLECTION = "reflection";
public static final String METHODTYPE_RESOURCE = "resource";
public static final String METHODTYPE_SERIALIZATION = "serialization";
public static final String METHODTYPE_PROXY = "proxy";
private static final String METHODTYPE_REFLECTION = "reflection";
private static final String METHODTYPE_RESOURCE = "resource";
private static final String METHODTYPE_SERIALIZATION = "serialization";
private static final String METHODTYPE_PROXY = "proxy";

private static final Map<String, Set<String>> reflectMethodNames = new HashMap<>();
private static final Map<String, Set<String>> resourceMethodNames = new HashMap<>();
Expand Down Expand Up @@ -204,7 +204,7 @@ protected void run(StructuredGraph graph, CoreProviders context) {
* Returns the name and type of a method if it exists in the predetermined set, based on its
* graph and MethodCallTargetNode; otherwise, returns null.
*/
public Pair<String, String> getMethod(MethodCallTargetNode callTarget) {
private static Pair<String, String> getMethod(MethodCallTargetNode callTarget) {
String methodName = callTarget.targetMethod().getName();
String declaringClass = callTarget.targetMethod().getDeclaringClass().toJavaName();

Expand Down

0 comments on commit 065061b

Please sign in to comment.