ktlint: Replace TAG properties with extension
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
15
app/src/main/java/com/aurora/extensions/Any.kt
Normal file
15
app/src/main/java/com/aurora/extensions/Any.kt
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The Calyx Institute
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package com.aurora.extensions
|
||||
|
||||
/**
|
||||
* Simple extension method to provide logging TAG
|
||||
*/
|
||||
inline val <reified T> T.TAG: String
|
||||
get() = when {
|
||||
T::class.java.isAnonymousClass -> T::class.java.name
|
||||
else -> T::class.java.simpleName
|
||||
}
|
||||
Reference in New Issue
Block a user