Class ApkResHelper
java.lang.Object
com.pnfsoftware.jeb.core.units.code.android.ApkResHelper
Gather APK resources (strings and integers atm) to make them easily retrievable by client code,
such as disassembly generators for
IDexUnit. This helper walks through the processed
Resources held by corresponding IXmlUnit. The path structure of the units matter.
Access to this object is thread-safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInternal cache of resource identifiers and values. -
Constructor Summary
ConstructorsConstructorDescriptionApkResHelper(IApkUnit apk) Create an APK resource helper.ApkResHelper(IApkUnit apk, List<String> preferredLocales) Create an APK resource helper. -
Method Summary
Modifier and TypeMethodDescriptiongenerateAutoCommentForPotentialResourceId(int resId) Generate a comment for a potential resource identifier.getInteger(int resId) Retrieve an integer resource value.getString(int resId) Retrieve a string resource value.
-
Constructor Details
-
ApkResHelper
Create an APK resource helper.- Parameters:
apk- mandatory unitpreferredLocales- optional
-
ApkResHelper
Create an APK resource helper.- Parameters:
apk- APK unit
-
-
Method Details
-
getString
Retrieve a string resource value.- Parameters:
resId- resource identifier- Returns:
- the string value, or null
-
getInteger
Retrieve an integer resource value.- Parameters:
resId- resource identifier- Returns:
- the integer value, or null
-
generateAutoCommentForPotentialResourceId
Generate a comment for a potential resource identifier.- Parameters:
resId- resource identifier- Returns:
- an auto-comment, or null
-