Skip to content

Commit 73f3fbb

Browse files
capozmrjameshamilton
authored andcommitted
Add static getEntryPointsForType method to EntryPoint
Add a static method to retrieve the methods that are considered entry points for each component type
1 parent d3dd308 commit 73f3fbb

File tree

1 file changed

+17
-0
lines changed
  • base/src/main/java/proguard/analysis/datastructure/callgraph

1 file changed

+17
-0
lines changed

base/src/main/java/proguard/analysis/datastructure/callgraph/EntryPoint.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,23 @@ public EntryPoint(Type type, String className, String methodName)
139139
this.methodName = methodName;
140140
}
141141

142+
public static List<EntryPoint> getEntryPointsForType(Type type)
143+
{
144+
switch(type)
145+
{
146+
case ACTIVITY:
147+
return ENTRY_POINTS_ACTIVITY;
148+
case SERVICE:
149+
return ENTRY_POINTS_SERVICE;
150+
case BROADCAST_RECEIVER:
151+
return ENTRY_POINTS_BROADCAST_RECEIVER;
152+
case CONTENT_PROVIDER:
153+
return ENTRY_POINTS_CONTENT_PROVIDER;
154+
default:
155+
throw new IllegalStateException("Unsupported entry point type");
156+
}
157+
}
158+
142159
public MethodSignature toSignature()
143160
{
144161
return new MethodSignature(className.replace('.', '/'), methodName, (MethodDescriptor) null);

0 commit comments

Comments
 (0)