Stay organized with collections
Save and categorize content based on your preferences.
ClassContext
@Incubating interface ClassContext
Summary
Public methods
|
abstract ClassData? |
Loads the class data for the class with given className.
|
Properties
|
abstract ClassData |
Contains information about the class that will be instrumented.
|
Public methods
loadClassData
abstract fun loadClassData(className: String): ClassData?
Loads the class data for the class with given className.
Returns null if a class named className couldn't be found in the runtime classpath of the
class defined by the currentClassData.
Parameters |
className: String |
the fully qualified name of the class,
(e.g. "com.android.build.api.instrumentation.ClassContext") |
Properties
currentClassData
abstract val currentClassData: ClassData
Contains information about the class that will be instrumented.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ClassContext\n============\n\n```\n@Incubating interface ClassContext\n```\n\n|---------------------------------------------------------|\n| [com.android.build.api.instrumentation.ClassContext](#) |\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [ClassData](/reference/tools/gradle-api/7.0/com/android/build/api/instrumentation/ClassData)? | [loadClassData](#loadClassData(kotlin.String))`(`className:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Loads the class data for the class with given [className](#com.android.build.api.instrumentation.ClassContext$loadClassData(kotlin.String)/className). |\n\n| ### Properties ||\n|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [ClassData](/reference/tools/gradle-api/7.0/com/android/build/api/instrumentation/ClassData) | [currentClassData](#currentClassData:com.android.build.api.instrumentation.ClassData) Contains information about the class that will be instrumented. |\n\nPublic methods\n--------------\n\n### loadClassData\n\n```\nabstract fun loadClassData(className: String): ClassData?\n```\n\nLoads the class data for the class with given [className](#com.android.build.api.instrumentation.ClassContext$loadClassData(kotlin.String)/className).\n\nReturns null if a class named [className](#com.android.build.api.instrumentation.ClassContext$loadClassData(kotlin.String)/className) couldn't be found in the runtime classpath of the\nclass defined by the [currentClassData](#currentClassData:com.android.build.api.instrumentation.ClassData).\n\n| Parameters ||\n|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|\n| className: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the fully qualified name of the class, (e.g. \"com.android.build.api.instrumentation.ClassContext\") |\n\nProperties\n----------\n\n### currentClassData\n\n```\nabstract val currentClassData: ClassData\n```\n\nContains information about the class that will be instrumented."]]