add new method for onLyfecycleMethod string
This commit is contained in:
parent
b69854ea63
commit
d13e9a0c21
|
|
@ -257,6 +257,20 @@ public final class Lc {
|
|||
+ (caller != null ? " of object " + caller.getClass().getSimpleName() + '(' + Integer.toHexString(caller.hashCode()) + ')' : "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns line of code from where this method called.
|
||||
*
|
||||
* @param caller Object who is calling for code point;
|
||||
* @param methodName String represents lifecycle method in which it was called
|
||||
* @return String represents code point.
|
||||
*/
|
||||
@Non
|
||||
@NonNull
|
||||
public static String getCodePoint(@Nullable final Object caller, final String methodName) {
|
||||
return methodName
|
||||
+ (caller != null ? " of object " + caller.getClass().getSimpleName() + '(' + Integer.toHexString(caller.hashCode()) + ')' : "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints stacktrace in log with specified tag.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue