@@ -96,14 +96,14 @@ public ComponentType getComponentType(SootClass currentClass) {
9696
9797 // Check the type of this class
9898 ComponentType ctype = ComponentType .Plain ;
99- FastHierarchy fh = Scene . v (). getOrMakeFastHierarchy ();
99+ FastHierarchy fh = getFastHierarchy ();
100100
101101 if (fh != null ) {
102102 // We first look for the specialized types
103103
104104 // (a1) android.app.Fragment
105- if (osClassFragment != null && Scene . v (). getOrMakeFastHierarchy (). canStoreType ( currentClass . getType (),
106- osClassFragment .getType ()))
105+ if (osClassFragment != null
106+ && getFastHierarchy (). canStoreType ( currentClass . getType (), osClassFragment .getType ()))
107107 ctype = ComponentType .Fragment ;
108108 else if (osClassSupportFragment != null
109109 && fh .canStoreType (currentClass .getType (), osClassSupportFragment .getType ()))
@@ -168,7 +168,7 @@ else if (osClassContentProvider != null
168168 */
169169 public boolean isApplicationClass (SootClass clazz ) {
170170 return osClassApplication != null
171- && Scene . v (). getOrMakeFastHierarchy ().canStoreType (clazz .getType (), osClassApplication .getType ());
171+ && getFastHierarchy ().canStoreType (clazz .getType (), osClassApplication .getType ());
172172 }
173173
174174 /**
@@ -180,7 +180,7 @@ public boolean isApplicationClass(SootClass clazz) {
180180 */
181181 public boolean isComponentFactoryClass (SootClass clazz ) {
182182 return osClassComponentFactory != null
183- && Scene . v (). getOrMakeFastHierarchy ().canStoreType (clazz .getType (), osClassComponentFactory .getType ());
183+ && getFastHierarchy ().canStoreType (clazz .getType (), osClassComponentFactory .getType ());
184184 }
185185
186186 /**
@@ -291,7 +291,7 @@ private static Collection<? extends MethodOrMethodContext> getLifecycleMethods(S
291291 SootMethodRepresentationParser parser = SootMethodRepresentationParser .v ();
292292
293293 Scene scene = Scene .v ();
294- FastHierarchy fh = Scene . v () .getOrMakeFastHierarchy ();
294+ FastHierarchy fh = scene .getOrMakeFastHierarchy ();
295295 nextMethod : for (String sig : methods ) {
296296 SootClass currentClass = sc ;
297297 String name = parser .getMethodNameFromSubSignature (sig );
@@ -328,6 +328,14 @@ private static Collection<? extends MethodOrMethodContext> getLifecycleMethods(S
328328 return lifecycleMethods ;
329329 }
330330
331+ /**
332+ * Returns the used fast hierarchy
333+ * @return the used fast hierarchy
334+ */
335+ protected FastHierarchy getFastHierarchy () {
336+ return Scene .v ().getOrMakeFastHierarchy ();
337+ }
338+
331339 /**
332340 * Checks whether a method is potentially callable from JavaScript
333341 * @param m the method
0 commit comments