public class KittyDexUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
KittyDexUtils.DexRuntimeException
Runtime exception for rethrowing
|
Modifier and Type | Field and Description |
---|---|
static java.lang.Class[] |
CHILD_CLASSES_TO_SEEK
TODO change to one more filter in future releases
|
static java.lang.String |
DEFAULT_LOG_TAG |
static int |
LOG_LEVEL_ERROR |
static int |
LOG_LEVEL_INFO |
static int |
LOG_LEVEL_WARNING |
static KittyDexClassNameFilter |
NO_ANDROID_CLASSES_FILTER |
static KittyDexClassFilter |
ONLY_REGULAR_CLASSES_FILTER
Only regular classes filter
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.Class> |
filterClassesList(KittyDexClassFilter filter,
java.util.List<java.lang.Class> classes)
Returns filtered list of classes
|
java.util.List<java.lang.Class> |
filterProvidedClasses(KittyDexClassFilter filter,
java.util.List<java.lang.Class> classesToFilter)
Returns provided list filtered with provided filter
|
java.util.List<java.lang.Class> |
getAllClasses()
Returns list of classes available for current package
|
java.util.List<java.lang.Class> |
getAllClasses(boolean skipExceptions,
boolean log,
int logLevelFilter,
java.lang.String logTag)
Returns list of classes available for current package
|
java.util.List<java.lang.Class> |
getAppClasses()
Returns list of classes for this Android application
|
java.util.List<java.lang.Class> |
getFilteredAppClasses(KittyDexClassFilter filter)
Returns list of filtered app classes
|
static KittyDexUtils |
getInstance(android.content.Context ctx)
Double check singleton get instance for getting
KittyDexUtils instance
Would be creating instance with following parameters KittyDexClassNameFilter filter = NO_ANDROID_CLASSES_FILTER
skipExceptions = false logOn = false lTag = DEFAULT_LOG_TAG
logLevel = LOG_LEVEL_INFO |
static KittyDexUtils |
getInstance(android.content.Context ctx,
KittyDexClassNameFilter filter,
boolean skipExceptions,
boolean logOn,
java.lang.String lTag,
int logLevel)
Double check singleton get instance for getting parametrized
KittyDexUtils instance |
public static final KittyDexClassFilter ONLY_REGULAR_CLASSES_FILTER
public static final KittyDexClassNameFilter NO_ANDROID_CLASSES_FILTER
public static final java.lang.Class[] CHILD_CLASSES_TO_SEEK
public static int LOG_LEVEL_INFO
public static int LOG_LEVEL_WARNING
public static int LOG_LEVEL_ERROR
public static final java.lang.String DEFAULT_LOG_TAG
public static KittyDexUtils getInstance(android.content.Context ctx)
KittyDexUtils
instance
NO_ANDROID_CLASSES_FILTER
DEFAULT_LOG_TAG
LOG_LEVEL_INFO
ctx
- application's context, can't be nullpublic static KittyDexUtils getInstance(android.content.Context ctx, KittyDexClassNameFilter filter, boolean skipExceptions, boolean logOn, java.lang.String lTag, int logLevel)
KittyDexUtils
instancectx
- application's context, can't be nullfilter
- class filename filter, can be null, but it is highly recommended to set
it to something sensible, cause without filter it would be created all classes of
all android classes packaged in application, so use either default filter (NO_ANDROID_CLASSES_FILTER
)
or create your own instance of KittyDexClassNameFilter
that would suit your needsskipExceptions
- with this flag no predicted exceptions would be thrown except unpredicted ones and IllegalArgumentException
on bad parameters passed into getInstance(Context, KittyDexClassNameFilter, boolean, boolean, String, int)
logOn
- logging flaglTag
- log tag, must not be longer 23 chars lengthlogLevel
- log level, only three log levels are supported: LOG_LEVEL_INFO
, LOG_LEVEL_WARNING
and LOG_LEVEL_ERROR
KittyDexUtils
public static java.util.List<java.lang.Class> filterClassesList(KittyDexClassFilter filter, java.util.List<java.lang.Class> classes)
filter
- filter objectclasses
- list of classes to filterpublic java.util.List<java.lang.Class> getAppClasses()
public java.util.List<java.lang.Class> getFilteredAppClasses(KittyDexClassFilter filter)
filter
- public java.util.List<java.lang.Class> filterProvidedClasses(KittyDexClassFilter filter, java.util.List<java.lang.Class> classesToFilter)
filter
- classesToFilter
- public java.util.List<java.lang.Class> getAllClasses(boolean skipExceptions, boolean log, int logLevelFilter, java.lang.String logTag)
skipExceptions
- log
- logTag
- logLevelFilter
- KittyDexUtils.DexRuntimeException
- if failed and skipExceptions flag = falsepublic java.util.List<java.lang.Class> getAllClasses()
KittyDexUtils.DexRuntimeException
- if failed and skipExceptions flag = false