DalvikBytecodeAnalysis/src/main/scala/parser/EntryPointsProvider.scala

19 lines
404 B
Scala

package parser
import dex.{DexClass, DexMethod}
// TODO: read from EntryPoints.txt file
class EntryPointsProvider(classes: Seq[DexClass]) {
def entryPoints(): Seq[(DexClass, DexMethod)] = {
classes.flatMap(
c =>
c.methods
.filter(m =>
m.name == "onCreate(Landroid/os/Bundle;)V"
|| m.name == "onStart()V")
.map(m => (c, m))
)
}
}