diff --git a/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt b/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
index 05d1a91..3d67b8b 100644
--- a/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
+++ b/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
@@ -223,7 +223,7 @@
 
     @Test
     @Suppress("DEPRECATION")
-    fun suspendingBlock_beginEndTransaction_blockingDaoMethods() {
+    fun suspendingBlock_beginEndTransaction_blockingDaoFunctions() {
         runBlocking {
             try {
                 database.beginTransaction()
@@ -266,7 +266,7 @@
     }
 
     @Test
-    fun suspendingBlock_blockingDaoMethods() {
+    fun suspendingBlock_blockingDaoFunctions() {
         runBlocking {
             booksDao.insertPublisherSuspend(TestUtil.PUBLISHER.publisherId, TestUtil.PUBLISHER.name)
 
@@ -624,7 +624,7 @@
     }
 
     @Test
-    fun withTransaction_blockingDaoMethods() {
+    fun withTransaction_blockingDaoFunctions() {
         runBlocking {
             database.withTransaction {
                 booksDao.insertPublisherSuspend(
@@ -641,7 +641,7 @@
     }
 
     @Test
-    fun withTransaction_blockingDaoMethods_contextSwitch() {
+    fun withTransaction_blockingDaoFunctions_contextSwitch() {
         runBlocking {
             database.withTransaction {
                 // normal query
@@ -907,7 +907,7 @@
                 .addCallback(
                     object : RoomDatabase.Callback() {
                         override fun onOpen(db: SupportSQLiteDatabase) {
-                            // this causes all transaction methods to throw, this can happen IRL
+                            // this causes all transaction functions to throw, this can happen IRL
                             throw RuntimeException("Error opening Database.")
                         }
                     }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt b/room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
index 0f00fc6..82f9c6d 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
@@ -27,7 +27,7 @@
 import androidx.room.processor.Context.BooleanProcessorOptions.GENERATE_KOTLIN
 import androidx.room.processor.DatabaseProcessor
 import androidx.room.processor.ProcessorErrors
-import androidx.room.vo.DaoMethod
+import androidx.room.vo.DaoFunction
 import androidx.room.vo.Warning
 import androidx.room.writer.AutoMigrationWriter
 import androidx.room.writer.DaoWriter
@@ -91,12 +91,12 @@
                     }
                 }
 
-        val daoMethodsMap = databases?.flatMap { db -> db.daoMethods.map { it to db } }?.toMap()
-        daoMethodsMap?.let {
+        val daoFunctionsMap = databases?.flatMap { db -> db.daoFunctions.map { it to db } }?.toMap()
+        daoFunctionsMap?.let {
             prepareDaosForWriting(databases, it.keys.toList())
-            it.forEach { (daoMethod, db) ->
+            it.forEach { (daoFunction, db) ->
                 DaoWriter(
-                        dao = daoMethod.dao,
+                        dao = daoFunction.dao,
                         dbElement = db.element,
                         writerContext = TypeWriter.WriterContext.fromProcessingContext(context)
                     )
@@ -166,31 +166,33 @@
         }
     }
 
-    /** Traverses all dao methods and assigns them suffix if they are used in multiple databases. */
+    /**
+     * Traverses all dao functions and assigns them suffix if they are used in multiple databases.
+     */
     private fun prepareDaosForWriting(
         databases: List<androidx.room.vo.Database>,
-        daoMethods: List<DaoMethod>
+        daoFunctions: List<DaoFunction>
     ) {
-        daoMethods
+        daoFunctions
             .groupBy { it.dao.typeName }
             // if used only in 1 database, nothing to do.
             .filter { entry -> entry.value.size > 1 }
             .forEach { entry ->
                 entry.value
-                    .groupBy { daoMethod ->
+                    .groupBy { daoFunction ->
                         // first suffix guess: Database's simple name
-                        val db = databases.first { db -> db.daoMethods.contains(daoMethod) }
+                        val db = databases.first { db -> db.daoFunctions.contains(daoFunction) }
                         db.typeName.simpleNames.last()
                     }
-                    .forEach { (dbName, methods) ->
-                        if (methods.size == 1) {
+                    .forEach { (dbName, functions) ->
+                        if (functions.size == 1) {
                             // good, db names do not clash, use db name as suffix
-                            methods.first().dao.setSuffix(dbName)
+                            functions.first().dao.setSuffix(dbName)
                         } else {
                             // ok looks like a dao is used in 2 different databases both of
                             // which have the same name. enumerate.
-                            methods.forEachIndexed { index, method ->
-                                method.dao.setSuffix("${dbName}_$index")
+                            functions.forEachIndexed { index, function ->
+                                function.dao.setSuffix("${dbName}_$index")
                             }
                         }
                     }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
index a52c017..ce81e10 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
@@ -30,8 +30,8 @@
 import androidx.room.compiler.processing.XTypeElement
 import androidx.room.verifier.DatabaseVerifier
 import androidx.room.vo.Dao
-import androidx.room.vo.KotlinBoxedPrimitiveMethodDelegate
-import androidx.room.vo.KotlinDefaultMethodDelegate
+import androidx.room.vo.KotlinBoxedPrimitiveFunctionDelegate
+import androidx.room.vo.KotlinDefaultFunctionDelegate
 import androidx.room.vo.Warning
 
 class DaoProcessor(
@@ -60,15 +60,15 @@
             return Dao(
                 element = element,
                 type = element.type,
-                queryMethods = emptyList(),
-                rawQueryMethods = emptyList(),
-                insertMethods = emptyList(),
-                upsertMethods = emptyList(),
-                deleteMethods = emptyList(),
-                updateMethods = emptyList(),
-                transactionMethods = emptyList(),
-                kotlinBoxedPrimitiveMethodDelegates = emptyList(),
-                kotlinDefaultMethodDelegates = emptyList(),
+                queryFunctions = emptyList(),
+                rawQueryFunctions = emptyList(),
+                insertFunctions = emptyList(),
+                upsertFunctions = emptyList(),
+                deleteFunctions = emptyList(),
+                updateFunctions = emptyList(),
+                transactionFunctions = emptyList(),
+                kotlinBoxedPrimitiveFunctionDelegates = emptyList(),
+                kotlinDefaultFunctionDelegates = emptyList(),
                 constructorParamType = null
             )
         }
@@ -84,43 +84,43 @@
         )
 
         val declaredType = element.type
-        val allMethods = element.getAllMethods()
-        val methods =
-            allMethods
+        val allFunctions = element.getAllMethods()
+        val functions =
+            allFunctions
                 .filter { it.isAbstract() && !it.hasKotlinDefaultImpl() }
-                .groupBy { method ->
-                    if (method.isKotlinPropertyMethod()) {
+                .groupBy { function ->
+                    if (function.isKotlinPropertyMethod()) {
                         context.checker.check(
-                            predicate = method.hasAnnotation(Query::class),
-                            element = method,
+                            predicate = function.hasAnnotation(Query::class),
+                            element = function,
                             errorMsg = ProcessorErrors.INVALID_ANNOTATION_IN_DAO_PROPERTY
                         )
                     } else {
                         context.checker.check(
                             predicate =
-                                PROCESSED_ANNOTATIONS.count { method.hasAnnotation(it) } <= 1,
-                            element = method,
-                            errorMsg = ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_METHOD
+                                PROCESSED_ANNOTATIONS.count { function.hasAnnotation(it) } <= 1,
+                            element = function,
+                            errorMsg = ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_FUNCTION
                         )
                     }
-                    if (method.hasAnnotation(JvmName::class)) {
+                    if (function.hasAnnotation(JvmName::class)) {
                         context.logger.w(
-                            Warning.JVM_NAME_ON_OVERRIDDEN_METHOD,
-                            method,
-                            ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_METHOD
+                            Warning.JVM_NAME_ON_OVERRIDDEN_FUNCTION,
+                            function,
+                            ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_FUNCTION
                         )
                     }
-                    if (method.hasAnnotation(Query::class)) {
+                    if (function.hasAnnotation(Query::class)) {
                         Query::class
-                    } else if (method.hasAnnotation(Insert::class)) {
+                    } else if (function.hasAnnotation(Insert::class)) {
                         Insert::class
-                    } else if (method.hasAnnotation(Delete::class)) {
+                    } else if (function.hasAnnotation(Delete::class)) {
                         Delete::class
-                    } else if (method.hasAnnotation(Update::class)) {
+                    } else if (function.hasAnnotation(Update::class)) {
                         Update::class
-                    } else if (method.hasAnnotation(RawQuery::class)) {
+                    } else if (function.hasAnnotation(RawQuery::class)) {
                         RawQuery::class
-                    } else if (method.hasAnnotation(Upsert::class)) {
+                    } else if (function.hasAnnotation(Upsert::class)) {
                         Upsert::class
                     } else {
                         Any::class
@@ -137,9 +137,9 @@
                 dbVerifier
             }
 
-        val queryMethods =
-            methods[Query::class]?.map {
-                QueryMethodProcessor(
+        val queryFunctions =
+            functions[Query::class]?.map {
+                QueryFunctionProcessor(
                         baseContext = context,
                         containing = declaredType,
                         executableElement = it,
@@ -148,9 +148,9 @@
                     .process()
             } ?: emptyList()
 
-        val rawQueryMethods =
-            methods[RawQuery::class]?.map {
-                RawQueryMethodProcessor(
+        val rawQueryFunctions =
+            functions[RawQuery::class]?.map {
+                RawQueryFunctionProcessor(
                         baseContext = context,
                         containing = declaredType,
                         executableElement = it
@@ -158,9 +158,9 @@
                     .process()
             } ?: emptyList()
 
-        val insertMethods =
-            methods[Insert::class]?.map {
-                InsertMethodProcessor(
+        val insertFunctions =
+            functions[Insert::class]?.map {
+                InsertFunctionProcessor(
                         baseContext = context,
                         containing = declaredType,
                         executableElement = it
@@ -168,9 +168,9 @@
                     .process()
             } ?: emptyList()
 
-        val deleteMethods =
-            methods[Delete::class]?.map {
-                DeleteMethodProcessor(
+        val deleteFunctions =
+            functions[Delete::class]?.map {
+                DeleteFunctionProcessor(
                         baseContext = context,
                         containing = declaredType,
                         executableElement = it
@@ -178,9 +178,9 @@
                     .process()
             } ?: emptyList()
 
-        val updateMethods =
-            methods[Update::class]?.map {
-                UpdateMethodProcessor(
+        val updateFunctions =
+            functions[Update::class]?.map {
+                UpdateFunctionProcessor(
                         baseContext = context,
                         containing = declaredType,
                         executableElement = it
@@ -188,9 +188,9 @@
                     .process()
             } ?: emptyList()
 
-        val upsertMethods =
-            methods[Upsert::class]?.map {
-                UpsertMethodProcessor(
+        val upsertFunctions =
+            functions[Upsert::class]?.map {
+                UpsertFunctionProcessor(
                         baseContext = context,
                         containing = declaredType,
                         executableElement = it
@@ -198,14 +198,14 @@
                     .process()
             } ?: emptyList()
 
-        val transactionMethods =
-            allMethods
+        val transactionFunctions =
+            allFunctions
                 .filter { member ->
                     member.hasAnnotation(Transaction::class) &&
                         PROCESSED_ANNOTATIONS.none { member.hasAnnotation(it) }
                 }
                 .map {
-                    TransactionMethodProcessor(
+                    TransactionFunctionProcessor(
                             baseContext = context,
                             containingElement = element,
                             containingType = declaredType,
@@ -214,29 +214,29 @@
                         .process()
                 }
 
-        // Only try to find Kotlin boxed bridge methods when the dao extends a class or
-        // implements an interface since otherwise there are no bridge method generated by
+        // Only try to find Kotlin boxed bridge functions when the dao extends a class or
+        // implements an interface since otherwise there are no bridge function generated by
         // Kotlin.
-        val unannotatedMethods = methods[Any::class] ?: emptyList()
-        val kotlinBoxedPrimitiveBridgeMethods =
+        val unannotatedFunctions = functions[Any::class] ?: emptyList()
+        val kotlinBoxedPrimitiveBridgeFunctions =
             if (element.superClass != null || element.getSuperInterfaceElements().isNotEmpty()) {
-                matchKotlinBoxedPrimitiveMethods(
-                    unannotatedMethods,
-                    methods.values.flatten() - unannotatedMethods
+                matchKotlinBoxedPrimitiveFunctions(
+                    unannotatedFunctions,
+                    functions.values.flatten() - unannotatedFunctions
                 )
             } else {
                 emptyList()
             }
 
-        val kotlinDefaultMethodDelegates =
+        val kotlinDefaultFunctionDelegates =
             if (element.isInterface()) {
-                val allProcessedMethods =
-                    methods.values.flatten() + transactionMethods.map { it.element }
-                allMethods
-                    .filterNot { allProcessedMethods.contains(it) }
-                    .mapNotNull { method ->
-                        if (method.hasKotlinDefaultImpl()) {
-                            KotlinDefaultMethodDelegate(element = method)
+                val allProcessedFunctions =
+                    functions.values.flatten() + transactionFunctions.map { it.element }
+                allFunctions
+                    .filterNot { allProcessedFunctions.contains(it) }
+                    .mapNotNull { function ->
+                        if (function.hasKotlinDefaultImpl()) {
+                            KotlinDefaultFunctionDelegate(element = function)
                         } else {
                             null
                         }
@@ -264,24 +264,24 @@
             ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_DAO_CLASSES
         )
 
-        val invalidAnnotatedMethods =
-            unannotatedMethods - kotlinBoxedPrimitiveBridgeMethods.map { it.element }
-        invalidAnnotatedMethods.forEach {
-            context.logger.e(it, ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_METHOD)
+        val invalidAnnotatedFunctions =
+            unannotatedFunctions - kotlinBoxedPrimitiveBridgeFunctions.map { it.element }
+        invalidAnnotatedFunctions.forEach {
+            context.logger.e(it, ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_FUNCTION)
         }
 
         return Dao(
             element = element,
             type = declaredType,
-            queryMethods = queryMethods,
-            rawQueryMethods = rawQueryMethods,
-            insertMethods = insertMethods,
-            deleteMethods = deleteMethods,
-            updateMethods = updateMethods,
-            upsertMethods = upsertMethods,
-            transactionMethods = transactionMethods.toList(),
-            kotlinBoxedPrimitiveMethodDelegates = kotlinBoxedPrimitiveBridgeMethods,
-            kotlinDefaultMethodDelegates = kotlinDefaultMethodDelegates.toList(),
+            queryFunctions = queryFunctions,
+            rawQueryFunctions = rawQueryFunctions,
+            insertFunctions = insertFunctions,
+            deleteFunctions = deleteFunctions,
+            updateFunctions = updateFunctions,
+            upsertFunctions = upsertFunctions,
+            transactionFunctions = transactionFunctions.toList(),
+            kotlinBoxedPrimitiveFunctionDelegates = kotlinBoxedPrimitiveBridgeFunctions,
+            kotlinDefaultFunctionDelegates = kotlinDefaultFunctionDelegates.toList(),
             constructorParamType = constructorParamType
         )
     }
@@ -299,17 +299,17 @@
     }
 
     /**
-     * Find Kotlin bridge methods generated for overrides of primitives, see KT-46650. When
-     * generating the Java implementation of the DAO, Room needs to also override the bridge method
-     * generated by Kotlin for the boxed version, it will contain the same name, return type and
-     * parameter, but the generic primitive params will be boxed.
+     * Find Kotlin bridge functions generated for overrides of primitives, see KT-46650. When
+     * generating the Java implementation of the DAO, Room needs to also override the bridge
+     * function generated by Kotlin for the boxed version, it will contain the same name, return
+     * type and parameter, but the generic primitive params will be boxed.
      */
-    private fun matchKotlinBoxedPrimitiveMethods(
-        unannotatedMethods: List<XMethodElement>,
-        annotatedMethods: List<XMethodElement>
+    private fun matchKotlinBoxedPrimitiveFunctions(
+        unannotatedFunctions: List<XMethodElement>,
+        annotatedFunctions: List<XMethodElement>
     ) =
-        unannotatedMethods.mapNotNull { unannotated ->
-            annotatedMethods
+        unannotatedFunctions.mapNotNull { unannotated ->
+            annotatedFunctions
                 .firstOrNull {
                     if (it.jvmName != unannotated.jvmName) {
                         return@firstOrNull false
@@ -341,8 +341,8 @@
                     }
                     return@firstOrNull true
                 }
-                ?.let { matchingMethod ->
-                    KotlinBoxedPrimitiveMethodDelegate(unannotated, matchingMethod)
+                ?.let { matchingFunction ->
+                    KotlinBoxedPrimitiveFunctionDelegate(unannotated, matchingFunction)
                 }
         }
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassFunctionProcessor.kt
similarity index 83%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassFunctionProcessor.kt
index 6f295d1e..aa6252b 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassFunctionProcessor.kt
@@ -18,16 +18,16 @@
 
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.vo.DataClassMethod
+import androidx.room.vo.DataClassFunction
 
 /** processes an executable element as member of the owning class */
-class DataClassMethodProcessor(
+class DataClassFunctionProcessor(
     private val context: Context,
     private val element: XMethodElement,
     private val owner: XType
 ) {
-    fun process(): DataClassMethod {
+    fun process(): DataClassFunction {
         val asMember = element.asMemberOf(owner)
-        return DataClassMethod(element = element, resolvedType = asMember)
+        return DataClassFunction(element = element, resolvedType = asMember)
     }
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassProcessor.kt
index efed0d7..a80892c 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/DataClassProcessor.kt
@@ -38,7 +38,7 @@
 import androidx.room.vo.CallType
 import androidx.room.vo.Constructor
 import androidx.room.vo.DataClass
-import androidx.room.vo.DataClassMethod
+import androidx.room.vo.DataClassFunction
 import androidx.room.vo.EmbeddedField
 import androidx.room.vo.Entity
 import androidx.room.vo.EntityOrView
@@ -230,7 +230,11 @@
                 .asSequence()
                 .filter { !it.isAbstract() && !it.hasAnnotation(Ignore::class) }
                 .map {
-                    DataClassMethodProcessor(context = context, element = it, owner = declaredType)
+                    DataClassFunctionProcessor(
+                            context = context,
+                            element = it,
+                            owner = declaredType
+                        )
                         .process()
                 }
                 .toList()
@@ -748,11 +752,11 @@
         return referenceRecursionList.joinToString(" -> ")
     }
 
-    private fun assignGetters(fields: List<Field>, getterCandidates: List<DataClassMethod>) {
+    private fun assignGetters(fields: List<Field>, getterCandidates: List<DataClassFunction>) {
         fields.forEach { field -> assignGetter(field, getterCandidates) }
     }
 
-    private fun assignGetter(field: Field, getterCandidates: List<DataClassMethod>) {
+    private fun assignGetter(field: Field, getterCandidates: List<DataClassFunction>) {
         val success =
             chooseAssignment(
                 field = field,
@@ -818,7 +822,7 @@
 
     private fun assignSetters(
         fields: List<Field>,
-        setterCandidates: List<DataClassMethod>,
+        setterCandidates: List<DataClassFunction>,
         constructor: Constructor?
     ) {
         fields.forEach { field -> assignSetter(field, setterCandidates, constructor) }
@@ -826,7 +830,7 @@
 
     private fun assignSetter(
         field: Field,
-        setterCandidates: List<DataClassMethod>,
+        setterCandidates: List<DataClassFunction>,
         constructor: Constructor?
     ) {
         if (constructor != null && constructor.hasField(field)) {
@@ -910,11 +914,11 @@
      */
     private fun chooseAssignment(
         field: Field,
-        candidates: List<DataClassMethod>,
+        candidates: List<DataClassFunction>,
         nameVariations: List<String>,
-        getType: (DataClassMethod) -> XType,
+        getType: (DataClassFunction) -> XType,
         assignFromField: () -> Unit,
-        assignFromMethod: (DataClassMethod) -> Unit,
+        assignFromMethod: (DataClassFunction) -> Unit,
         reportAmbiguity: (List<String>) -> Unit
     ): Boolean {
         if (field.element.isPublic()) {
@@ -955,9 +959,9 @@
     }
 
     private fun verifyAndChooseOneFrom(
-        candidates: List<DataClassMethod>?,
+        candidates: List<DataClassFunction>?,
         reportAmbiguity: (List<String>) -> Unit
-    ): DataClassMethod? {
+    ): DataClassFunction? {
         if (candidates == null) {
             return null
         }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
index 6cf7930..5892c05 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
@@ -32,7 +32,7 @@
 import androidx.room.verifier.DatabaseVerificationErrors
 import androidx.room.verifier.DatabaseVerifier
 import androidx.room.vo.Dao
-import androidx.room.vo.DaoMethod
+import androidx.room.vo.DaoFunction
 import androidx.room.vo.Database
 import androidx.room.vo.DatabaseConstructor
 import androidx.room.vo.DatabaseView
@@ -87,7 +87,7 @@
         validateUniqueTableAndViewNames(element, entities, views)
 
         val declaredType = element.type
-        val daoMethods =
+        val daoFunctions =
             element
                 .getAllMethods()
                 .filter { it.isAbstract() }
@@ -104,25 +104,25 @@
                     if (daoElement == null) {
                         context.logger.e(
                             executable,
-                            ProcessorErrors.DATABASE_INVALID_DAO_METHOD_RETURN_TYPE
+                            ProcessorErrors.DATABASE_INVALID_DAO_FUNCTION_RETURN_TYPE
                         )
                         null
                     } else {
                         if (executable.hasAnnotation(JvmName::class)) {
                             context.logger.w(
-                                Warning.JVM_NAME_ON_OVERRIDDEN_METHOD,
+                                Warning.JVM_NAME_ON_OVERRIDDEN_FUNCTION,
                                 executable,
-                                ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_METHOD
+                                ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_FUNCTION
                             )
                         }
                         val dao =
                             DaoProcessor(context, daoElement, declaredType, dbVerifier).process()
-                        DaoMethod(executable, dao)
+                        DaoFunction(executable, dao)
                     }
                 }
                 .toList()
 
-        validateUniqueDaoClasses(element, daoMethods, entities)
+        validateUniqueDaoClasses(element, daoFunctions, entities)
         validateUniqueIndices(element, entities)
 
         val hasForeignKeys = entities.any { it.foreignKeys.isNotEmpty() }
@@ -145,7 +145,7 @@
                 type = element.type,
                 entities = entities,
                 views = views,
-                daoMethods = daoMethods,
+                daoFunctions = daoFunctions,
                 exportSchema = dbAnnotation.value.exportSchema,
                 enableForeignKeys = hasForeignKeys,
                 overrideClearAllTables = hasClearAllTables,
@@ -315,23 +315,23 @@
 
     private fun validateUniqueDaoClasses(
         dbElement: XTypeElement,
-        daoMethods: List<DaoMethod>,
+        daoFunctions: List<DaoFunction>,
         entities: List<Entity>
     ) {
         val entityTypeNames = entities.map { it.typeName }.toSet()
-        daoMethods
+        daoFunctions
             .groupBy { it.dao.typeName }
             .forEach {
                 if (it.value.size > 1) {
                     val error =
                         ProcessorErrors.duplicateDao(
                             dao = it.key.toString(context.codeLanguage),
-                            methodNames = it.value.map { it.element.name }
+                            functionNames = it.value.map { it.element.name }
                         )
-                    it.value.forEach { daoMethod ->
+                    it.value.forEach { daoFunction ->
                         context.logger.e(
-                            daoMethod.element,
-                            ProcessorErrors.DAO_METHOD_CONFLICTS_WITH_OTHERS
+                            daoFunction.element,
+                            ProcessorErrors.DAO_FUNCTION_CONFLICTS_WITH_OTHERS
                         )
                     }
                     // also report the full error for the database
@@ -353,15 +353,15 @@
                     }
                 }
             }
-        daoMethods.forEach { daoMethod ->
-            daoMethod.dao.deleteOrUpdateShortcutMethods.forEach { method ->
+        daoFunctions.forEach { daoFunction ->
+            daoFunction.dao.mDeleteOrUpdateShortcutFunctions.forEach { method ->
                 method.entities.forEach {
-                    check(method.element, daoMethod.dao, it.value.entityTypeName)
+                    check(method.element, daoFunction.dao, it.value.entityTypeName)
                 }
             }
-            daoMethod.dao.insertOrUpsertShortcutMethods.forEach { method ->
+            daoFunction.dao.mInsertOrUpsertShortcutFunctions.forEach { method ->
                 method.entities.forEach {
-                    check(method.element, daoMethod.dao, it.value.entityTypeName)
+                    check(method.element, daoFunction.dao, it.value.entityTypeName)
                 }
             }
         }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/DeleteMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/DeleteFunctionProcessor.kt
similarity index 80%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/DeleteMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/DeleteFunctionProcessor.kt
index 6967b93..0cf83d2 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/DeleteMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/DeleteFunctionProcessor.kt
@@ -18,26 +18,26 @@
 import androidx.room.Delete
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.vo.DeleteMethod
+import androidx.room.vo.DeleteFunction
 
-class DeleteMethodProcessor(
+class DeleteFunctionProcessor(
     baseContext: Context,
     val containing: XType,
     val executableElement: XMethodElement
 ) {
     val context = baseContext.fork(executableElement)
 
-    fun process(): DeleteMethod {
-        val delegate = ShortcutMethodProcessor(context, containing, executableElement)
+    fun process(): DeleteFunction {
+        val delegate = ShortcutFunctionProcessor(context, containing, executableElement)
         val annotation =
             delegate.extractAnnotation(Delete::class, ProcessorErrors.MISSING_DELETE_ANNOTATION)
 
         val returnType = delegate.extractReturnType()
 
-        val methodBinder = delegate.findDeleteOrUpdateMethodBinder(returnType)
+        val functionBinder = delegate.findDeleteOrUpdateFunctionBinder(returnType)
 
         context.checker.check(
-            methodBinder.adapter != null,
+            functionBinder.adapter != null,
             executableElement,
             ProcessorErrors.CANNOT_FIND_DELETE_RESULT_ADAPTER
         )
@@ -49,11 +49,11 @@
                 onValidatePartialEntity = { _, _ -> }
             )
 
-        return DeleteMethod(
+        return DeleteFunction(
             element = delegate.executableElement,
             entities = entities,
             parameters = params,
-            methodBinder = methodBinder
+            functionBinder = functionBinder
         )
     }
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/FunctionProcessorDelegate.kt
similarity index 72%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/FunctionProcessorDelegate.kt
index da5e301..d7b77ec 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/FunctionProcessorDelegate.kt
@@ -36,20 +36,20 @@
 import androidx.room.solver.prepared.binder.PreparedQueryResultBinder
 import androidx.room.solver.query.result.CoroutineResultBinder
 import androidx.room.solver.query.result.QueryResultBinder
-import androidx.room.solver.shortcut.binder.CoroutineDeleteOrUpdateMethodBinder
-import androidx.room.solver.shortcut.binder.CoroutineInsertOrUpsertMethodBinder
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
-import androidx.room.solver.transaction.binder.CoroutineTransactionMethodBinder
-import androidx.room.solver.transaction.binder.InstantTransactionMethodBinder
-import androidx.room.solver.transaction.binder.TransactionMethodBinder
-import androidx.room.solver.transaction.result.TransactionMethodAdapter
+import androidx.room.solver.shortcut.binder.CoroutineDeleteOrUpdateFunctionBinder
+import androidx.room.solver.shortcut.binder.CoroutineInsertOrUpsertFunctionBinder
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
+import androidx.room.solver.transaction.binder.CoroutineTransactionFunctionBinder
+import androidx.room.solver.transaction.binder.InstantTransactionFunctionBinder
+import androidx.room.solver.transaction.binder.TransactionFunctionBinder
+import androidx.room.solver.transaction.result.TransactionFunctionAdapter
 import androidx.room.vo.QueryParameter
 import androidx.room.vo.ShortcutQueryParameter
-import androidx.room.vo.TransactionMethod
+import androidx.room.vo.TransactionFunction
 
-/** Delegate class with common functionality for DAO method processors. */
-abstract class MethodProcessorDelegate(
+/** Delegate class with common functionality for DAO function processors. */
+abstract class FunctionProcessorDelegate(
     val context: Context,
     val containing: XType,
     val executableElement: XMethodElement
@@ -84,39 +84,39 @@
         query: ParsedQuery
     ): PreparedQueryResultBinder
 
-    abstract fun findInsertMethodBinder(
+    abstract fun findInsertFunctionBinder(
         returnType: XType,
         params: List<ShortcutQueryParameter>
-    ): InsertOrUpsertMethodBinder
+    ): InsertOrUpsertFunctionBinder
 
-    abstract fun findDeleteOrUpdateMethodBinder(returnType: XType): DeleteOrUpdateMethodBinder
+    abstract fun findDeleteOrUpdateFunctionBinder(returnType: XType): DeleteOrUpdateFunctionBinder
 
-    abstract fun findUpsertMethodBinder(
+    abstract fun findUpsertFunctionBinder(
         returnType: XType,
         params: List<ShortcutQueryParameter>
-    ): InsertOrUpsertMethodBinder
+    ): InsertOrUpsertFunctionBinder
 
-    abstract fun findTransactionMethodBinder(
-        callType: TransactionMethod.CallType
-    ): TransactionMethodBinder
+    abstract fun findTransactionFunctionBinder(
+        callType: TransactionFunction.CallType
+    ): TransactionFunctionBinder
 
     companion object {
         fun createFor(
             context: Context,
             containing: XType,
             executableElement: XMethodElement
-        ): MethodProcessorDelegate {
+        ): FunctionProcessorDelegate {
             val asMember = executableElement.asMemberOf(containing)
             return if (asMember.isSuspendFunction()) {
-                SuspendMethodProcessorDelegate(context, containing, executableElement, asMember)
+                SuspendFunctionProcessorDelegate(context, containing, executableElement, asMember)
             } else {
-                DefaultMethodProcessorDelegate(context, containing, executableElement, asMember)
+                DefaultFunctionProcessorDelegate(context, containing, executableElement, asMember)
             }
         }
     }
 }
 
-fun MethodProcessorDelegate.returnsDeferredType(): Boolean {
+fun FunctionProcessorDelegate.returnsDeferredType(): Boolean {
     val deferredTypes =
         DEFERRED_TYPES.mapNotNull { context.processingEnv.findType(it.canonicalName) }
     val returnType = extractReturnType()
@@ -125,13 +125,13 @@
     }
 }
 
-/** Default delegate for DAO methods. */
-class DefaultMethodProcessorDelegate(
+/** Default delegate for DAO functions. */
+class DefaultFunctionProcessorDelegate(
     context: Context,
     containing: XType,
     executableElement: XMethodElement,
     val executableType: XMethodType
-) : MethodProcessorDelegate(context, containing, executableElement) {
+) : FunctionProcessorDelegate(context, containing, executableElement) {
 
     override fun extractReturnType(): XType {
         return executableType.returnType
@@ -148,34 +148,34 @@
     override fun findPreparedResultBinder(returnType: XType, query: ParsedQuery) =
         context.typeAdapterStore.findPreparedQueryResultBinder(returnType, query)
 
-    override fun findInsertMethodBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
-        context.typeAdapterStore.findInsertMethodBinder(returnType, params)
+    override fun findInsertFunctionBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
+        context.typeAdapterStore.findInsertFunctionBinder(returnType, params)
 
-    override fun findDeleteOrUpdateMethodBinder(returnType: XType) =
-        context.typeAdapterStore.findDeleteOrUpdateMethodBinder(returnType)
+    override fun findDeleteOrUpdateFunctionBinder(returnType: XType) =
+        context.typeAdapterStore.findDeleteOrUpdateFunctionBinder(returnType)
 
-    override fun findUpsertMethodBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
-        context.typeAdapterStore.findUpsertMethodBinder(returnType, params)
+    override fun findUpsertFunctionBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
+        context.typeAdapterStore.findUpsertFunctionBinder(returnType, params)
 
-    override fun findTransactionMethodBinder(callType: TransactionMethod.CallType) =
-        InstantTransactionMethodBinder(
+    override fun findTransactionFunctionBinder(callType: TransactionFunction.CallType) =
+        InstantTransactionFunctionBinder(
             returnType = executableElement.returnType,
             adapter =
-                TransactionMethodAdapter(
-                    methodName = executableElement.name,
+                TransactionFunctionAdapter(
+                    functionName = executableElement.name,
                     jvmMethodName = executableElement.jvmName,
                     callType = callType
                 ),
         )
 }
 
-/** Delegate for DAO methods that are a suspend function. */
-class SuspendMethodProcessorDelegate(
+/** Delegate for DAO functions that are a suspend functions. */
+class SuspendFunctionProcessorDelegate(
     context: Context,
     containing: XType,
     executableElement: XMethodElement,
     val executableType: XSuspendMethodType
-) : MethodProcessorDelegate(context, containing, executableElement) {
+) : FunctionProcessorDelegate(context, containing, executableElement) {
 
     private val continuationParam: XVariableElement by lazy {
         val continuationType =
@@ -208,33 +208,33 @@
             continuationParamName = continuationParam.name
         )
 
-    override fun findInsertMethodBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
-        CoroutineInsertOrUpsertMethodBinder(
+    override fun findInsertFunctionBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
+        CoroutineInsertOrUpsertFunctionBinder(
             typeArg = returnType,
             adapter = context.typeAdapterStore.findInsertAdapter(returnType, params),
             continuationParamName = continuationParam.name
         )
 
-    override fun findUpsertMethodBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
-        CoroutineInsertOrUpsertMethodBinder(
+    override fun findUpsertFunctionBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
+        CoroutineInsertOrUpsertFunctionBinder(
             typeArg = returnType,
             adapter = context.typeAdapterStore.findUpsertAdapter(returnType, params),
             continuationParamName = continuationParam.name
         )
 
-    override fun findDeleteOrUpdateMethodBinder(returnType: XType) =
-        CoroutineDeleteOrUpdateMethodBinder(
+    override fun findDeleteOrUpdateFunctionBinder(returnType: XType) =
+        CoroutineDeleteOrUpdateFunctionBinder(
             typeArg = returnType,
             adapter = context.typeAdapterStore.findDeleteOrUpdateAdapter(returnType),
             continuationParamName = continuationParam.name
         )
 
-    override fun findTransactionMethodBinder(callType: TransactionMethod.CallType) =
-        CoroutineTransactionMethodBinder(
+    override fun findTransactionFunctionBinder(callType: TransactionFunction.CallType) =
+        CoroutineTransactionFunctionBinder(
             returnType = executableElement.returnType,
             adapter =
-                TransactionMethodAdapter(
-                    methodName = executableElement.name,
+                TransactionFunctionAdapter(
+                    functionName = executableElement.name,
                     jvmMethodName = executableElement.jvmName,
                     callType = callType
                 ),
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/InsertMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/InsertFunctionProcessor.kt
similarity index 90%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/InsertMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/InsertFunctionProcessor.kt
index 3337480..f0b6ace 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/InsertMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/InsertFunctionProcessor.kt
@@ -22,18 +22,18 @@
 import androidx.room.OnConflictStrategy
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.vo.InsertMethod
+import androidx.room.vo.InsertFunction
 import androidx.room.vo.findFieldByColumnName
 
-class InsertMethodProcessor(
+class InsertFunctionProcessor(
     baseContext: Context,
     val containing: XType,
     val executableElement: XMethodElement
 ) {
     val context = baseContext.fork(executableElement)
 
-    fun process(): InsertMethod {
-        val delegate = ShortcutMethodProcessor(context, containing, executableElement)
+    fun process(): InsertFunction {
+        val delegate = ShortcutFunctionProcessor(context, containing, executableElement)
         val annotation =
             delegate.extractAnnotation(Insert::class, ProcessorErrors.MISSING_INSERT_ANNOTATION)
 
@@ -48,7 +48,7 @@
         context.checker.notUnbound(
             returnType,
             executableElement,
-            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_INSERT_METHODS
+            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_INSERT_FUNCTIONS
         )
 
         val (entities, params) =
@@ -88,21 +88,21 @@
                 }
             )
 
-        val methodBinder = delegate.findInsertMethodBinder(returnType, params)
+        val functionBinder = delegate.findInsertFunctionBinder(returnType, params)
 
         context.checker.check(
-            methodBinder.adapter != null,
+            functionBinder.adapter != null,
             executableElement,
             ProcessorErrors.CANNOT_FIND_INSERT_RESULT_ADAPTER
         )
 
-        return InsertMethod(
+        return InsertFunction(
             element = executableElement,
             returnType = returnType,
             entities = entities,
             parameters = params,
             onConflict = onConflict,
-            methodBinder = methodBinder
+            functionBinder = functionBinder
         )
     }
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
index afaa03d..c2a18e1 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
@@ -36,56 +36,59 @@
         return this.trimIndent().replace("\n", " ")
     }
 
-    val ISSUE_TRACKER_LINK = "https://issuetracker.google.com/issues/new?component=413107"
+    const val ISSUE_TRACKER_LINK = "https://issuetracker.google.com/issues/new?component=413107"
 
-    val MISSING_QUERY_ANNOTATION = "Query methods must be annotated with ${Query::class.java}"
-    val MISSING_INSERT_ANNOTATION = "Insert methods must be annotated with ${Insert::class.java}"
-    val MISSING_DELETE_ANNOTATION = "Delete methods must be annotated with ${Delete::class.java}"
-    val MISSING_UPDATE_ANNOTATION = "Update methods must be annotated with ${Update::class.java}"
-    val MISSING_UPSERT_ANNOTATION = "Upsert methods must be annotated with ${Upsert::class.java}"
+    val MISSING_QUERY_ANNOTATION = "Query functions must be annotated with ${Query::class.java}"
+    val MISSING_INSERT_ANNOTATION = "Insert functions must be annotated with ${Insert::class.java}"
+    val MISSING_DELETE_ANNOTATION = "Delete functions must be annotated with ${Delete::class.java}"
+    val MISSING_UPDATE_ANNOTATION = "Update functions must be annotated with ${Update::class.java}"
+    val MISSING_UPSERT_ANNOTATION = "Upsert functions must be annotated with ${Upsert::class.java}"
     val MISSING_RAWQUERY_ANNOTATION =
-        "RawQuery methods must be annotated with" + " ${RawQuery::class.java}"
-    val INVALID_ON_CONFLICT_VALUE = "On conflict value must be one of @OnConflictStrategy values."
-    val TRANSACTION_REFERENCE_DOCS =
+        "RawQuery functions must be annotated with" + " ${RawQuery::class.java}"
+    const val INVALID_ON_CONFLICT_VALUE =
+        "On conflict value must be one of @OnConflictStrategy values."
+    const val TRANSACTION_REFERENCE_DOCS =
         "https://developer.android.com/reference/androidx/" + "room/Transaction.html"
-    val INVALID_ANNOTATION_COUNT_IN_DAO_METHOD =
-        "An abstract DAO method must be" +
+    val INVALID_ANNOTATION_COUNT_IN_DAO_FUNCTION =
+        "An abstract DAO function must be" +
             " annotated with one and only one of the following annotations: " +
             DaoProcessor.PROCESSED_ANNOTATIONS.joinToString(", ") { "@" + it.java.simpleName }
     val INVALID_ANNOTATION_IN_DAO_PROPERTY =
         "An abstract DAO property must be" + " annotated with @get:${Query::class.java}."
-    val CANNOT_RESOLVE_RETURN_TYPE = "Cannot resolve return type for %s"
-    val CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_METHODS =
+    const val CANNOT_RESOLVE_RETURN_TYPE = "Cannot resolve return type for %s"
+    const val CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_FUNCTIONS =
         "Cannot use unbound generics in query" +
-            " methods. It must be bound to a type through base Dao class."
-    val CANNOT_USE_UNBOUND_GENERICS_IN_INSERT_METHODS =
+            " functions. It must be bound to a type through base Dao class."
+    const val CANNOT_USE_UNBOUND_GENERICS_IN_INSERT_FUNCTIONS =
         "Cannot use unbound generics in" +
-            " insert methods. It must be bound to a type through base Dao class."
-    val CANNOT_USE_UNBOUND_GENERICS_IN_UPSERT_METHODS =
+            " insert functions. It must be bound to a type through base Dao class."
+    const val CANNOT_USE_UNBOUND_GENERICS_IN_UPSERT_FUNCTIONS =
         "Cannot use unbound generics in" +
-            " upsert methods. It must be bound to a type through base Dao class."
-    val CANNOT_USE_UNBOUND_GENERICS_IN_ENTITY_FIELDS = "Cannot use unbound fields in entities."
-    val CANNOT_USE_UNBOUND_GENERICS_IN_DAO_CLASSES =
+            " upsert functions. It must be bound to a type through base Dao class."
+    const val CANNOT_USE_UNBOUND_GENERICS_IN_ENTITY_FIELDS =
+        "Cannot use unbound fields in entities."
+    const val CANNOT_USE_UNBOUND_GENERICS_IN_DAO_CLASSES =
         "Cannot use unbound generics in Dao classes." +
             " If you are trying to create a base DAO, create a normal class, extend it with type" +
             " params then mark the subclass with @Dao."
-    val CANNOT_USE_MAP_COLUMN_AND_MAP_INFO_SIMULTANEOUSLY =
+    const val CANNOT_USE_MAP_COLUMN_AND_MAP_INFO_SIMULTANEOUSLY =
         "Cannot use @MapColumn and " +
             " @MapInfo annotation in the same function. Please prefer using @MapColumn only."
-    val CANNOT_FIND_GETTER_FOR_FIELD = "Cannot find getter for field."
-    val CANNOT_FIND_SETTER_FOR_FIELD = "Cannot find setter for field."
-    val MISSING_PRIMARY_KEY = "An entity must have at least 1 field annotated with @PrimaryKey"
-    val AUTO_INCREMENTED_PRIMARY_KEY_IS_NOT_INT =
+    const val CANNOT_FIND_GETTER_FOR_FIELD = "Cannot find getter for field."
+    const val CANNOT_FIND_SETTER_FOR_FIELD = "Cannot find setter for field."
+    const val MISSING_PRIMARY_KEY =
+        "An entity must have at least 1 field annotated with @PrimaryKey"
+    const val AUTO_INCREMENTED_PRIMARY_KEY_IS_NOT_INT =
         "If a primary key is annotated with" +
             " autoGenerate, its type must be int, Integer, long or Long."
-    val AUTO_INCREMENT_EMBEDDED_HAS_MULTIPLE_FIELDS =
+    const val AUTO_INCREMENT_EMBEDDED_HAS_MULTIPLE_FIELDS =
         "When @PrimaryKey annotation is used on a" +
             " field annotated with @Embedded, the embedded class should have only 1 field."
-    val INVALID_INDEX_ORDERS_SIZE =
+    const val INVALID_INDEX_ORDERS_SIZE =
         "The number of entries in @Index#orders() should be " +
             "equal to the amount of columns defined in the @Index value."
 
-    val DO_NOT_USE_GENERIC_IMMUTABLE_MULTIMAP =
+    const val DO_NOT_USE_GENERIC_IMMUTABLE_MULTIMAP =
         "Do not use ImmutableMultimap as a type (as with" +
             " Multimap itself). Instead use the subtypes such as ImmutableSetMultimap or " +
             "ImmutableListMultimap."
@@ -104,9 +107,9 @@
             " Available column names:${allColumns.joinToString(", ")}"
     }
 
-    val DAO_MUST_BE_AN_ABSTRACT_CLASS_OR_AN_INTERFACE =
+    const val DAO_MUST_BE_AN_ABSTRACT_CLASS_OR_AN_INTERFACE =
         "Dao class must be an abstract class or" + " an interface"
-    val DAO_MUST_BE_ANNOTATED_WITH_DAO = "Dao class must be annotated with @Dao"
+    const val DAO_MUST_BE_ANNOTATED_WITH_DAO = "Dao class must be annotated with @Dao"
 
     fun daoMustHaveMatchingConstructor(daoName: String, dbName: String): String {
         return """
@@ -116,81 +119,82 @@
             .trim()
     }
 
-    val ENTITY_MUST_BE_ANNOTATED_WITH_ENTITY = "Entity class must be annotated with @Entity"
-    val DATABASE_ANNOTATION_MUST_HAVE_LIST_OF_ENTITIES =
+    const val ENTITY_MUST_BE_ANNOTATED_WITH_ENTITY = "Entity class must be annotated with @Entity"
+    const val DATABASE_ANNOTATION_MUST_HAVE_LIST_OF_ENTITIES =
         "@Database annotation must specify list" + " of entities"
-    val COLUMN_NAME_CANNOT_BE_EMPTY =
+    const val COLUMN_NAME_CANNOT_BE_EMPTY =
         "Column name cannot be blank. If you don't want to set it" +
             ", just remove the @ColumnInfo annotation or use @ColumnInfo.INHERIT_FIELD_NAME."
 
-    val ENTITY_TABLE_NAME_CANNOT_BE_EMPTY =
+    const val ENTITY_TABLE_NAME_CANNOT_BE_EMPTY =
         "Entity table name cannot be blank. If you don't want" +
             " to set it, just remove the tableName property."
 
-    val ENTITY_TABLE_NAME_CANNOT_START_WITH_SQLITE =
+    const val ENTITY_TABLE_NAME_CANNOT_START_WITH_SQLITE =
         "Entity table name cannot start with \"sqlite_\"."
 
-    val VIEW_MUST_BE_ANNOTATED_WITH_DATABASE_VIEW =
+    const val VIEW_MUST_BE_ANNOTATED_WITH_DATABASE_VIEW =
         "View class must be annotated with " + "@DatabaseView"
-    val VIEW_NAME_CANNOT_BE_EMPTY =
+    const val VIEW_NAME_CANNOT_BE_EMPTY =
         "View name cannot be blank. If you don't want" +
             " to set it, just remove the viewName property."
-    val VIEW_NAME_CANNOT_START_WITH_SQLITE = "View name cannot start with \"sqlite_\"."
-    val VIEW_QUERY_MUST_BE_SELECT = "Query for @DatabaseView must be a SELECT."
-    val VIEW_QUERY_CANNOT_TAKE_ARGUMENTS = "Query for @DatabaseView cannot take any arguments."
+    const val VIEW_NAME_CANNOT_START_WITH_SQLITE = "View name cannot start with \"sqlite_\"."
+    const val VIEW_QUERY_MUST_BE_SELECT = "Query for @DatabaseView must be a SELECT."
+    const val VIEW_QUERY_CANNOT_TAKE_ARGUMENTS =
+        "Query for @DatabaseView cannot take any arguments."
 
     fun viewCircularReferenceDetected(views: List<String>): String {
         return "Circular reference detected among views: ${views.joinToString(", ")}"
     }
 
-    val CANNOT_BIND_QUERY_PARAMETER_INTO_STMT =
-        "Query method parameters should either be a" +
+    const val CANNOT_BIND_QUERY_PARAMETER_INTO_STMT =
+        "Query function parameters should either be a" +
             " type that can be converted into a database column or a List / Array that contains" +
             " such type. You can consider adding a Type Adapter for this."
 
-    val QUERY_PARAMETERS_CANNOT_START_WITH_UNDERSCORE =
-        "Query/Insert method parameters cannot " + "start with underscore (_)."
+    const val QUERY_PARAMETERS_CANNOT_START_WITH_UNDERSCORE =
+        "Query/Insert function parameters cannot " + "start with underscore (_)."
 
     fun cannotFindQueryResultAdapter(returnTypeName: String) =
-        "Not sure how to convert the query result to this method's return type ($returnTypeName)."
+        "Not sure how to convert the query result to this function's return type ($returnTypeName)."
 
     fun classMustImplementEqualsAndHashCode(keyType: String) =
         "The key" +
-            " of the provided method's multimap return type must implement equals() and " +
+            " of the provided function's multimap return type must implement equals() and " +
             "hashCode(). Key type is: $keyType."
 
-    val INSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_INSERT =
-        "Method annotated with" + " @Insert but does not have any parameters to insert."
+    const val INSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_INSERT =
+        "Function annotated with" + " @Insert but does not have any parameters to insert."
 
-    val UPSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_UPSERT =
-        "Method annotated with" + " @Upsert but does not have any parameters to insert or update."
+    const val UPSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_UPSERT =
+        "Function annotated with" + " @Upsert but does not have any parameters to insert or update."
 
-    val DELETE_MISSING_PARAMS =
-        "Method annotated with" + " @Delete but does not have any parameters to delete."
+    const val DELETE_MISSING_PARAMS =
+        "Function annotated with" + " @Delete but does not have any parameters to delete."
 
     fun cannotMapSpecifiedColumn(column: String, columnsInQuery: List<String>, annotation: String) =
         "Column specified in the provided @$annotation annotation must be present in the query. " +
             "Provided: $column. Columns found: ${columnsInQuery.joinToString(", ")}"
 
-    val MAP_INFO_MUST_HAVE_AT_LEAST_ONE_COLUMN_PROVIDED =
+    const val MAP_INFO_MUST_HAVE_AT_LEAST_ONE_COLUMN_PROVIDED =
         "To use the @MapInfo annotation, you " +
             "must provide either the key column name, value column name, or both."
 
     fun mayNeedMapColumn(columnArg: String): String {
         return """
             Looks like you may need to use @MapColumn to clarify the 'columnName' needed for
-            type argument(s) in the return type of a method. Type argument that needs
+            type argument(s) in the return type of a function. Type argument that needs
             @MapColumn: $columnArg
             """
             .trim()
     }
 
-    val CANNOT_FIND_DELETE_RESULT_ADAPTER =
-        "Not sure how to handle delete method's " +
+    const val CANNOT_FIND_DELETE_RESULT_ADAPTER =
+        "Not sure how to handle delete function's " +
             "return type. Currently the supported return types are void, int or Int."
 
-    val CANNOT_FIND_UPDATE_RESULT_ADAPTER =
-        "Not sure how to handle update method's " +
+    const val CANNOT_FIND_UPDATE_RESULT_ADAPTER =
+        "Not sure how to handle update function's " +
             "return type. Currently the supported return types are void, int or Int."
 
     fun suspendReturnsDeferredType(returnTypeName: String) =
@@ -198,105 +202,107 @@
             "modifier must not return a deferred/async type ($returnTypeName). Most probably this " +
             "is an error. Consider changing the return type or removing the suspend modifier."
 
-    val CANNOT_FIND_INSERT_RESULT_ADAPTER = "Not sure how to handle insert method's return type."
+    const val CANNOT_FIND_INSERT_RESULT_ADAPTER =
+        "Not sure how to handle insert function's return type."
 
-    val CANNOT_FIND_UPSERT_RESULT_ADAPTER = "Not sure how to handle upsert method's return type."
+    const val CANNOT_FIND_UPSERT_RESULT_ADAPTER =
+        "Not sure how to handle upsert function's return type."
 
-    val INSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH =
-        "Insert method accepts multiple parameters " +
+    const val INSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH =
+        "Insert function accepts multiple parameters " +
             "but the return type is a single element. Try using a multiple element return type."
 
-    val UPSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH =
-        "Upsert method accepts multiple parameters " +
+    const val UPSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH =
+        "Upsert function accepts multiple parameters " +
             "but the return type is a single element. Try using a multiple element return type."
 
-    val INSERT_SINGLE_PARAM_MULTI_RETURN_MISMATCH =
-        "Insert method accepts a single parameter " +
+    const val INSERT_SINGLE_PARAM_MULTI_RETURN_MISMATCH =
+        "Insert function accepts a single parameter " +
             "but the return type is a collection of elements. Try using a single element return type."
 
-    val UPSERT_SINGLE_PARAM_MULTI_RETURN_MISMATCH =
-        "Upsert method accepts a single parameter " +
+    const val UPSERT_SINGLE_PARAM_MULTI_RETURN_MISMATCH =
+        "Upsert function accepts a single parameter " +
             "but the return type is a collection of elements. Try using a single element return type."
 
-    val UPDATE_MISSING_PARAMS =
-        "Method annotated with" + " @Update but does not have any parameters to update."
+    const val UPDATE_MISSING_PARAMS =
+        "Function annotated with" + " @Update but does not have any parameters to update."
 
-    val TRANSACTION_METHOD_MODIFIERS =
-        "Method annotated with @Transaction must not be " +
-            "private, final, or abstract. It can be abstract only if the method is also" +
+    const val TRANSACTION_FUNCTION_MODIFIERS =
+        "Function annotated with @Transaction must not be " +
+            "private, final, or abstract. It can be abstract only if the function is also" +
             " annotated with @Query."
 
-    fun nullableParamInShortcutMethod(param: String) =
-        "Methods annotated with [@Insert, " +
+    fun nullableParamInShortcutFunction(param: String) =
+        "Functions annotated with [@Insert, " +
             "@Upsert, @Update, @Delete] shouldn't declare nullable parameters ($param)."
 
-    fun transactionMethodAsync(returnTypeName: String) =
-        "Method annotated with @Transaction must" +
+    fun transactionFunctionAsync(returnTypeName: String) =
+        "Function annotated with @Transaction must" +
             " not return deferred/async return type $returnTypeName. Since transactions are" +
-            " thread confined and Room cannot guarantee that all queries in the method" +
+            " thread confined and Room cannot guarantee that all queries in the function" +
             " implementation are performed on the same thread, only synchronous @Transaction" +
-            " implemented methods are allowed. If a transaction is started and a change of thread" +
+            " implemented functions are allowed. If a transaction is started and a change of thread" +
             " is done and waited upon then a database deadlock can occur if the additional thread" +
             " attempts to perform a query. This restrictions prevents such situation from" +
             " occurring."
 
-    val TRANSACTION_MISSING_ON_RELATION =
+    const val TRANSACTION_MISSING_ON_RELATION =
         "The return value includes a data class with a @Relation." +
-            " It is usually desired to annotate this method with @Transaction to avoid" +
+            " It is usually desired to annotate this function with @Transaction to avoid" +
             " possibility of inconsistent results between the data class and its relations. See " +
             TRANSACTION_REFERENCE_DOCS +
             " for details."
 
-    val CANNOT_FIND_ENTITY_FOR_SHORTCUT_QUERY_PARAMETER =
+    const val CANNOT_FIND_ENTITY_FOR_SHORTCUT_QUERY_PARAMETER =
         "Type of the parameter must be a class " +
             "annotated with @Entity or a collection/array of it."
 
     val DB_MUST_EXTEND_ROOM_DB =
         "Classes annotated with @Database should extend " + ROOM_DB.canonicalName
 
-    val OBSERVABLE_QUERY_NOTHING_TO_OBSERVE =
+    const val OBSERVABLE_QUERY_NOTHING_TO_OBSERVE =
         "Observable query return type (LiveData, Flowable" +
             ", DataSource, DataSourceFactory etc) can only be used with SELECT queries that" +
             " directly or indirectly (via @Relation, for example) access at least one table. For" +
             " @RawQuery, you should specify the list of tables to be observed via the" +
             " observedEntities field."
 
-    val RECURSIVE_REFERENCE_DETECTED =
+    const val RECURSIVE_REFERENCE_DETECTED =
         "Recursive referencing through @Embedded and/or @Relation " + "detected: %s"
 
-    private val TOO_MANY_MATCHING_GETTERS =
+    private const val TOO_MANY_MATCHING_GETTERS =
         "Ambiguous getter for %s. All of the following " +
             "match: %s. You can @Ignore the ones that you don't want to match."
 
-    fun tooManyMatchingGetters(field: Field, methodNames: List<String>): String {
-        return TOO_MANY_MATCHING_GETTERS.format(field, methodNames.joinToString(", "))
+    fun tooManyMatchingGetters(field: Field, functionNames: List<String>): String {
+        return TOO_MANY_MATCHING_GETTERS.format(field, functionNames.joinToString(", "))
     }
 
-    private val TOO_MANY_MATCHING_SETTERS =
+    private const val TOO_MANY_MATCHING_SETTERS =
         "Ambiguous setter for %s. All of the following " +
             "match: %s. You can @Ignore the ones that you don't want to match."
 
-    fun tooManyMatchingSetter(field: Field, methodNames: List<String>): String {
-        return TOO_MANY_MATCHING_SETTERS.format(field, methodNames.joinToString(", "))
+    fun tooManyMatchingSetter(field: Field, functionNames: List<String>): String {
+        return TOO_MANY_MATCHING_SETTERS.format(field, functionNames.joinToString(", "))
     }
 
-    val CANNOT_FIND_COLUMN_TYPE_ADAPTER =
+    const val CANNOT_FIND_COLUMN_TYPE_ADAPTER =
         "Cannot figure out how to save this field into" +
             " database. You can consider adding a type converter for it."
 
-    val VALUE_CLASS_ONLY_SUPPORTED_IN_KSP =
+    const val VALUE_CLASS_ONLY_SUPPORTED_IN_KSP =
         "Kotlin value classes are only supported " +
             "in Room using KSP and generating Kotlin (room.generateKotlin=true)."
 
-    val CANNOT_FIND_STMT_BINDER = "Cannot figure out how to bind this field into a statement."
+    const val CANNOT_FIND_STMT_BINDER = "Cannot figure out how to bind this field into a statement."
 
-    val CANNOT_FIND_STMT_READER = "Cannot figure out how to read this field from a statement."
+    const val CANNOT_FIND_STMT_READER = "Cannot figure out how to read this field from a statement."
 
     const val DEFAULT_VALUE_NULLABILITY = "Use of NULL as the default value of a non-null field"
 
-    private val MISSING_PARAMETER_FOR_BIND =
+    private const val MISSING_PARAMETER_FOR_BIND =
         "Each bind variable in the query must have a" +
-            " matching method parameter. Cannot find method parameters for %s."
+            " matching function parameter. Cannot find function parameters for %s."
 
     fun missingParameterForBindVariable(bindVarName: List<String>): String {
         return MISSING_PARAMETER_FOR_BIND.format(bindVarName.joinToString(", "))
@@ -307,30 +313,30 @@
             "Found $mapValueTypeName."
     }
 
-    private val UNUSED_QUERY_METHOD_PARAMETER = "Unused parameter%s: %s"
+    private const val UNUSED_QUERY_FUNCTION_PARAMETER = "Unused parameter%s: %s"
 
-    fun unusedQueryMethodParameter(unusedParams: List<String>): String {
-        return UNUSED_QUERY_METHOD_PARAMETER.format(
+    fun unusedQueryFunctionParameter(unusedParams: List<String>): String {
+        return UNUSED_QUERY_FUNCTION_PARAMETER.format(
             if (unusedParams.size > 1) "s" else "",
             unusedParams.joinToString(",")
         )
     }
 
-    private val DUPLICATE_TABLES_OR_VIEWS =
+    private const val DUPLICATE_TABLES_OR_VIEWS =
         "The name \"%s\" is used by multiple entities or views: %s"
 
     fun duplicateTableNames(tableName: String, entityNames: List<String>): String {
         return DUPLICATE_TABLES_OR_VIEWS.format(tableName, entityNames.joinToString(", "))
     }
 
-    val DAO_METHOD_CONFLICTS_WITH_OTHERS = "Dao method has conflicts."
+    const val DAO_FUNCTION_CONFLICTS_WITH_OTHERS = "Dao function has conflicts."
 
-    fun duplicateDao(dao: String, methodNames: List<String>): String {
+    fun duplicateDao(dao: String, functionNames: List<String>): String {
         return """
-                All of these functions [${methodNames.joinToString(", ")}] return the same DAO
+                All of these functions [${functionNames.joinToString(", ")}] return the same DAO
                 class [$dao].
-                A database can use a DAO only once so you should remove ${methodNames.size - 1} of
-                these conflicting DAO methods. If you are implementing any of these to fulfill an
+                A database can use a DAO only once so you should remove ${functionNames.size - 1} of
+                these conflicting DAO functions. If you are implementing any of these to fulfill an
                 interface, don't make it abstract, instead, implement the code that calls the
                 other one.
                 """
@@ -369,7 +375,7 @@
                 The query returns some columns [${unusedColumns.joinToString(", ")}] which are not
                 used by $dataClassNames. You can use @ColumnInfo annotation on the fields to specify
                 the mapping.
-                You can annotate the method with @RewriteQueriesToDropUnusedColumns to direct Room
+                You can annotate the function with @RewriteQueriesToDropUnusedColumns to direct Room
                 to rewrite your query to avoid fetching unused columns.
             """
                     .trim()
@@ -389,28 +395,28 @@
         return """
             $unusedColumnsWarning
             ${unusedFieldsWarning.joinToString(separator = " ")}
-            You can suppress this warning by annotating the method with
+            You can suppress this warning by annotating the function with
             @SuppressWarnings(RoomWarnings.QUERY_MISMATCH).
             Columns returned by the query: ${allColumns.joinToString(", ")}.
             """
             .trim()
     }
 
-    val TYPE_CONVERTER_UNBOUND_GENERIC = "Cannot use unbound generics in Type Converters."
-    val TYPE_CONVERTER_BAD_RETURN_TYPE = "Invalid return type for a type converter."
-    val TYPE_CONVERTER_MUST_RECEIVE_1_PARAM = "Type converters must receive 1 parameter."
-    val TYPE_CONVERTER_EMPTY_CLASS =
-        "Class is referenced as a converter but it does not have any" + " converter methods."
-    val TYPE_CONVERTER_MISSING_NOARG_CONSTRUCTOR =
+    const val TYPE_CONVERTER_UNBOUND_GENERIC = "Cannot use unbound generics in Type Converters."
+    const val TYPE_CONVERTER_BAD_RETURN_TYPE = "Invalid return type for a type converter."
+    const val TYPE_CONVERTER_MUST_RECEIVE_1_PARAM = "Type converters must receive 1 parameter."
+    const val TYPE_CONVERTER_EMPTY_CLASS =
+        "Class is referenced as a converter but it does not have any" + " converter functions."
+    const val TYPE_CONVERTER_MISSING_NOARG_CONSTRUCTOR =
         "Classes that are used as TypeConverters must" +
             " have no-argument public constructors. Use a ProvidedTypeConverter annotation if you" +
             " need to take control over creating an instance of a TypeConverter."
-    val TYPE_CONVERTER_MUST_BE_PUBLIC = "Type converters must be public."
-    val INNER_CLASS_TYPE_CONVERTER_MUST_BE_STATIC =
+    const val TYPE_CONVERTER_MUST_BE_PUBLIC = "Type converters must be public."
+    const val INNER_CLASS_TYPE_CONVERTER_MUST_BE_STATIC =
         "An inner class TypeConverter must be " + "static."
 
     fun duplicateTypeConverters(converters: List<CustomTypeConverter>): String {
-        return "Multiple methods define the same conversion. Conflicts with these:" +
+        return "Multiple functions define the same conversion. Conflicts with these:" +
             " ${converters.joinToString(", ") { it.toString() }}"
     }
 
@@ -419,7 +425,7 @@
     }
 
     // TODO must print field paths.
-    val DATA_CLASS_FIELD_HAS_DUPLICATE_COLUMN_NAME = "Field has non-unique column name."
+    const val DATA_CLASS_FIELD_HAS_DUPLICATE_COLUMN_NAME = "Field has non-unique column name."
 
     fun dataClassDuplicateFieldNames(columnName: String, fieldPaths: List<String>): String {
         return "Multiple fields have the same columnName: $columnName." +
@@ -431,7 +437,7 @@
             entityQName
     }
 
-    val INDEX_COLUMNS_CANNOT_BE_EMPTY = "List of columns in an index cannot be empty"
+    const val INDEX_COLUMNS_CANNOT_BE_EMPTY = "List of columns in an index cannot be empty"
 
     fun indexColumnDoesNotExist(columnName: String, allColumns: List<String>): String {
         return "$columnName referenced in the index does not exist in the Entity." +
@@ -478,7 +484,7 @@
             " Alternatively, you can set inheritSuperIndices to true in the @Entity annotation."
     }
 
-    val NOT_ENTITY_OR_VIEW = "The class must be either @Entity or @DatabaseView."
+    const val NOT_ENTITY_OR_VIEW = "The class must be either @Entity or @DatabaseView."
 
     fun relationCannotFindEntityField(
         entityName: String,
@@ -522,7 +528,7 @@
             "full table scan when resolving the relationship, it is highly advised to " +
             "create an index that covers this column."
 
-    val RELATION_IN_ENTITY = "Entities cannot have relations."
+    const val RELATION_IN_ENTITY = "Entities cannot have relations."
 
     fun relationAffinityMismatch(
         parentColumn: String,
@@ -585,13 +591,13 @@
             .trim()
     }
 
-    val MISSING_SCHEMA_EXPORT_DIRECTORY =
+    const val MISSING_SCHEMA_EXPORT_DIRECTORY =
         "Schema export directory was not provided to the" +
             " annotation processor so Room cannot export the schema. You can either provide" +
             " `room.schemaLocation` annotation processor argument by applying the Room Gradle plugin" +
             " (id 'androidx.room') OR set exportSchema to false."
 
-    val INVALID_FOREIGN_KEY_ACTION =
+    const val INVALID_FOREIGN_KEY_ACTION =
         "Invalid foreign key action. It must be one of the constants" +
             " defined in ForeignKey.Action"
 
@@ -603,7 +609,7 @@
             .trim()
     }
 
-    val FOREIGN_KEY_CANNOT_FIND_PARENT = "Cannot find parent entity class."
+    const val FOREIGN_KEY_CANNOT_FIND_PARENT = "Cannot find parent entity class."
 
     fun foreignKeyChildColumnDoesNotExist(columnName: String, allColumns: List<String>): String {
         return "($columnName) referenced in the foreign key does not exist in the Entity." +
@@ -619,9 +625,11 @@
             " ${allColumns.joinToString(",")}"
     }
 
-    val FOREIGN_KEY_EMPTY_CHILD_COLUMN_LIST = "Must specify at least 1 column name for the child"
+    const val FOREIGN_KEY_EMPTY_CHILD_COLUMN_LIST =
+        "Must specify at least 1 column name for the child"
 
-    val FOREIGN_KEY_EMPTY_PARENT_COLUMN_LIST = "Must specify at least 1 column name for the parent"
+    const val FOREIGN_KEY_EMPTY_PARENT_COLUMN_LIST =
+        "Must specify at least 1 column name for the parent"
 
     fun foreignKeyColumnNumberMismatch(
         childColumns: List<String>,
@@ -687,33 +695,33 @@
             .trim()
     }
 
-    val MISSING_ROOM_GUAVA_ARTIFACT =
+    const val MISSING_ROOM_GUAVA_ARTIFACT =
         "To use Guava features, you must add `guava`" +
             " artifact from Room as a dependency. androidx.room:room-guava:<version>"
 
-    val MISSING_ROOM_RXJAVA2_ARTIFACT =
+    const val MISSING_ROOM_RXJAVA2_ARTIFACT =
         "To use RxJava2 features, you must add `rxjava2`" +
             " artifact from Room as a dependency. androidx.room:room-rxjava2:<version>"
 
-    val MISSING_ROOM_RXJAVA3_ARTIFACT =
+    const val MISSING_ROOM_RXJAVA3_ARTIFACT =
         "To use RxJava3 features, you must add `rxjava3`" +
             " artifact from Room as a dependency. androidx.room:room-rxjava3:<version>"
 
-    val MISSING_ROOM_PAGING_ARTIFACT =
+    const val MISSING_ROOM_PAGING_ARTIFACT =
         "To use PagingSource, you must add `room-paging`" +
             " artifact from Room as a dependency. androidx.room:room-paging:<version>"
 
-    val MISSING_ROOM_PAGING_GUAVA_ARTIFACT =
+    const val MISSING_ROOM_PAGING_GUAVA_ARTIFACT =
         "To use ListenableFuturePagingSource, you must " +
             "add `room-paging-guava` artifact from Room as a dependency. " +
             "androidx.room:room-paging-guava:<version>"
 
-    val MISSING_ROOM_PAGING_RXJAVA2_ARTIFACT =
+    const val MISSING_ROOM_PAGING_RXJAVA2_ARTIFACT =
         "To use RxPagingSource, you must " +
             "add `room-paging-rxjava2` artifact from Room as a dependency. " +
             "androidx.room:room-paging-rxjava2:<version>"
 
-    val MISSING_ROOM_PAGING_RXJAVA3_ARTIFACT =
+    const val MISSING_ROOM_PAGING_RXJAVA3_ARTIFACT =
         "To use RxPagingSource, you must " +
             "add `room-paging-rxjava3` artifact from Room as a dependency. " +
             "androidx.room:room-paging-rxjava3:<version>"
@@ -753,12 +761,13 @@
             """
             .trim()
 
-    val PAGING_SPECIFY_DATA_SOURCE_TYPE = "For now, Room only supports PositionalDataSource class."
+    const val PAGING_SPECIFY_DATA_SOURCE_TYPE =
+        "For now, Room only supports PositionalDataSource class."
 
-    val PAGING_SPECIFY_PAGING_SOURCE_TYPE =
+    const val PAGING_SPECIFY_PAGING_SOURCE_TYPE =
         "For now, Room only supports PagingSource with Key of" + " type Int."
 
-    val PAGING_SPECIFY_PAGING_SOURCE_VALUE_TYPE =
+    const val PAGING_SPECIFY_PAGING_SOURCE_VALUE_TYPE =
         "For now, Room only supports PagingSource with" + " Value that is not of Collection type."
 
     fun primaryKeyNull(field: String): String {
@@ -768,13 +777,14 @@
             "https://www.sqlite.org/lang_createtable.html"
     }
 
-    val INVALID_COLUMN_NAME =
+    const val INVALID_COLUMN_NAME =
         "Invalid column name. Room does not allow using ` or \" in column" + " names"
 
-    val INVALID_TABLE_NAME = "Invalid table name. Room does not allow using ` or \" in table names"
+    const val INVALID_TABLE_NAME =
+        "Invalid table name. Room does not allow using ` or \" in table names"
 
-    val RAW_QUERY_BAD_PARAMS =
-        "RawQuery methods should have 1 and only 1 parameter with type" + " SupportSQLiteQuery"
+    const val RAW_QUERY_BAD_PARAMS =
+        "RawQuery functions should have 1 and only 1 parameter with type" + " SupportSQLiteQuery"
 
     fun parameterCannotBeNullable(parameterName: String) =
         """
@@ -782,7 +792,7 @@
     """
             .trimIndent()
 
-    val RAW_QUERY_BAD_RETURN_TYPE = "RawQuery methods must return a non-void type."
+    const val RAW_QUERY_BAD_RETURN_TYPE = "RawQuery functions must return a non-void type."
 
     fun rawQueryBadEntity(typeName: String): String {
         return """
@@ -798,43 +808,45 @@
         "@RawQuery does not allow passing a string anymore." +
             " Please use ${RoomTypeNames.RAW_QUERY.canonicalName}."
 
-    val MISSING_COPY_ANNOTATIONS =
+    const val MISSING_COPY_ANNOTATIONS =
         "Annotated property getter is missing " + "@AutoValue.CopyAnnotations."
 
     fun invalidAnnotationTarget(annotationName: String, elementKindName: String): String {
         return "@$annotationName is not allowed in this $elementKindName."
     }
 
-    val INDICES_IN_FTS_ENTITY = "Indices not allowed in FTS Entity."
+    const val INDICES_IN_FTS_ENTITY = "Indices not allowed in FTS Entity."
 
-    val FOREIGN_KEYS_IN_FTS_ENTITY = "Foreign Keys not allowed in FTS Entity."
+    const val FOREIGN_KEYS_IN_FTS_ENTITY = "Foreign Keys not allowed in FTS Entity."
 
-    val MISSING_PRIMARY_KEYS_ANNOTATION_IN_ROW_ID =
+    const val MISSING_PRIMARY_KEYS_ANNOTATION_IN_ROW_ID =
         "The field with column name 'rowid' in " +
             "an FTS entity must be annotated with @PrimaryKey."
 
-    val TOO_MANY_PRIMARY_KEYS_IN_FTS_ENTITY = "An FTS entity can only have a single primary key."
+    const val TOO_MANY_PRIMARY_KEYS_IN_FTS_ENTITY =
+        "An FTS entity can only have a single primary key."
 
-    val INVALID_FTS_ENTITY_PRIMARY_KEY_NAME =
+    const val INVALID_FTS_ENTITY_PRIMARY_KEY_NAME =
         "The single primary key field in an FTS entity " +
             "must either be named 'rowid' or must be annotated with @ColumnInfo(name = \"rowid\")"
 
-    val INVALID_FTS_ENTITY_PRIMARY_KEY_AFFINITY =
+    const val INVALID_FTS_ENTITY_PRIMARY_KEY_AFFINITY =
         "The single @PrimaryKey annotated field in an " + "FTS entity must be of INTEGER affinity."
 
     fun missingLanguageIdField(columnName: String) =
-        "The specified 'languageid' column: " + "\"$columnName\", was not found."
+        "The specified 'languageid' column: \"$columnName\", was not found."
 
-    val INVALID_FTS_ENTITY_LANGUAGE_ID_AFFINITY =
+    const val INVALID_FTS_ENTITY_LANGUAGE_ID_AFFINITY =
         "The 'languageid' field must be of INTEGER " + "affinity."
 
     fun missingNotIndexedField(missingNotIndexedColumns: List<String>) =
         "Non-existent columns are specified to be not indexed in notIndexed: " +
             missingNotIndexedColumns.joinToString(",")
 
-    val INVALID_FTS_ENTITY_PREFIX_SIZES = "Prefix sizes to index must non-zero positive values."
+    const val INVALID_FTS_ENTITY_PREFIX_SIZES =
+        "Prefix sizes to index must non-zero positive values."
 
-    val FTS_EXTERNAL_CONTENT_CANNOT_FIND_ENTITY = "Cannot find external content entity class."
+    const val FTS_EXTERNAL_CONTENT_CANNOT_FIND_ENTITY = "Cannot find external content entity class."
 
     fun externalContentNotAnEntity(className: String) =
         "External content entity referenced in " +
@@ -855,10 +867,10 @@
             "$entityName that matches with this partial entity field. If you don't wish to use " +
             "the field then you can annotate it with @Ignore."
 
-    val INVALID_TARGET_ENTITY_IN_SHORTCUT_METHOD =
+    const val INVALID_TARGET_ENTITY_IN_SHORTCUT_FUNCTION =
         "Target entity declared in @Insert, @Update " + "or @Delete must be annotated with @Entity."
 
-    val INVALID_RELATION_IN_PARTIAL_ENTITY = "Partial entities cannot have relations."
+    const val INVALID_RELATION_IN_PARTIAL_ENTITY = "Partial entities cannot have relations."
 
     fun invalidQueryForSingleColumnArray(returnType: String) =
         "If a DAO function has a " +
@@ -911,20 +923,20 @@
     fun cannotFindPreparedQueryResultAdapter(returnType: String, type: QueryType) =
         StringBuilder()
             .apply {
-                append("Not sure how to handle query method's return type ($returnType). ")
+                append("Not sure how to handle query function's return type ($returnType). ")
                 if (type == QueryType.INSERT) {
                     append(
-                        "INSERT query methods must either return void " +
+                        "INSERT query functions must either return void " +
                             "or long (the rowid of the inserted row)."
                     )
                 } else if (type == QueryType.UPDATE) {
                     append(
-                        "UPDATE query methods must either return void " +
+                        "UPDATE query functions must either return void " +
                             "or int (the number of updated rows)."
                     )
                 } else if (type == QueryType.DELETE) {
                     append(
-                        "DELETE query methods must either return void " +
+                        "DELETE query functions must either return void " +
                             "or int (the number of deleted rows)."
                     )
                 }
@@ -968,8 +980,8 @@
         """
             .trim()
 
-    val DATABASE_INVALID_DAO_METHOD_RETURN_TYPE =
-        "Abstract database methods must return a @Dao " + "annotated class or interface."
+    const val DATABASE_INVALID_DAO_FUNCTION_RETURN_TYPE =
+        "Abstract database functions must return a @Dao " + "annotated class or interface."
 
     fun invalidEntityTypeInDatabaseAnnotation(typeName: String): String {
         return "Invalid Entity type: $typeName. An entity in the database must be a class."
@@ -985,22 +997,22 @@
             "an @AutoMigration annotation."
     }
 
-    val EMBEDDED_TYPES_MUST_BE_A_CLASS_OR_INTERFACE =
+    const val EMBEDDED_TYPES_MUST_BE_A_CLASS_OR_INTERFACE =
         "The type of an Embedded field must be a " + "class or an interface."
-    val RELATION_TYPE_MUST_BE_A_CLASS_OR_INTERFACE =
+    const val RELATION_TYPE_MUST_BE_A_CLASS_OR_INTERFACE =
         "Entity type in a Relation must be a class " + "or an interface."
 
-    fun shortcutMethodArgumentMustBeAClass(typeName: String): String {
+    fun shortcutFunctionArgumentMustBeAClass(typeName: String): String {
         return "Invalid query argument: $typeName. It must be a class or an interface."
     }
 
-    val AUTOMIGRATION_SPEC_MUST_BE_CLASS = "The AutoMigration spec " + "type must be a class."
+    const val AUTOMIGRATION_SPEC_MUST_BE_CLASS = "The AutoMigration spec " + "type must be a class."
 
     fun autoMigrationElementMustImplementSpec(spec: String): String {
-        return "The AutoMigration spec " + "$spec must implement the AutoMigrationSpec interface."
+        return "The AutoMigration spec $spec must implement the AutoMigrationSpec interface."
     }
 
-    // TODO: (b/180389433) If the files don't exist the getSchemaFile() method should return
+    // TODO: (b/180389433) If the files don't exist the getSchemaFile() function should return
     //  null and before calling process
     fun autoMigrationToVersionMustBeGreaterThanFrom(to: Int, from: Int) =
         if (from > to) {
@@ -1147,10 +1159,10 @@
         return "Conflicting @RenameColumn annotations found: [$annotations]"
     }
 
-    val AUTO_MIGRATION_FOUND_BUT_EXPORT_SCHEMA_OFF =
+    const val AUTO_MIGRATION_FOUND_BUT_EXPORT_SCHEMA_OFF =
         "Cannot create auto migrations when " + "exportSchema is false."
 
-    val AUTO_MIGRATION_SCHEMA_IN_FOLDER_NULL =
+    const val AUTO_MIGRATION_SCHEMA_IN_FOLDER_NULL =
         "Schema import directory was not provided to the" +
             " annotation processor so Room cannot read older schemas. To generate auto migrations," +
             " you must provide `room.schemaLocation` annotation processor arguments by applying the" +
@@ -1162,15 +1174,15 @@
             " a different name."
     }
 
-    val INNER_CLASS_AUTOMIGRATION_SPEC_MUST_BE_STATIC =
+    const val INNER_CLASS_AUTOMIGRATION_SPEC_MUST_BE_STATIC =
         "An inner class AutoMigrationSpec must be" + " static."
 
-    val AUTOMIGRATION_SPEC_MISSING_NOARG_CONSTRUCTOR =
+    const val AUTOMIGRATION_SPEC_MISSING_NOARG_CONSTRUCTOR =
         "Classes that are used as " +
             "AutoMigrationSpec " +
             "implementations must have no-argument public constructors."
 
-    val JVM_NAME_ON_OVERRIDDEN_METHOD =
+    const val JVM_NAME_ON_OVERRIDDEN_FUNCTION =
         "Using @JvmName annotation on a function or accessor " +
             "that will be overridden by Room is not supported. If this is important for your use " +
             "case, please file a bug at $ISSUE_TRACKER_LINK with details."
@@ -1198,7 +1210,7 @@
         return "The column '$columnName' $locationDesc is ambiguous and cannot be properly " +
             "resolved. Please alias the column and $recommendation. Otherwise there is a risk of " +
             "the query returning invalid values. You can suppress this warning by annotating " +
-            "the method with @SuppressWarnings(RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT)."
+            "the function with @SuppressWarnings(RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT)."
     }
 
     enum class AmbiguousColumnLocation {
@@ -1207,25 +1219,25 @@
         ENTITY,
     }
 
-    val NONNULL_VOID =
+    const val NONNULL_VOID =
         "Invalid non-null declaration of 'Void', should be nullable. The 'Void' " +
             "class represents a placeholder type that is uninstantiable and 'null' is always returned."
 
-    fun nullableCollectionOrArrayReturnTypeInDaoMethod(
+    fun nullableCollectionOrArrayReturnTypeInDaoFunction(
         typeName: String,
         returnType: String
     ): String {
-        return "The nullable `$returnType` ($typeName) return type in a DAO method is " +
+        return "The nullable `$returnType` ($typeName) return type in a DAO function is " +
             "meaningless because Room will instead return an empty `$returnType` if no rows are " +
             "returned from the query."
     }
 
-    fun nullableComponentInDaoMethodReturnType(typeName: String): String {
-        return "The DAO method return type ($typeName) with the nullable type argument " +
+    fun nullableComponentInDaoFunctionReturnType(typeName: String): String {
+        return "The DAO function return type ($typeName) with the nullable type argument " +
             "is meaningless because for now Room will never put a null value in a result."
     }
 
-    val EXPORTING_SCHEMA_TO_RESOURCES =
+    const val EXPORTING_SCHEMA_TO_RESOURCES =
         "Schema export is set to be outputted as a resource" +
             " (i.e. room.exportSchemaResource is set to true), this means Room will write the current" +
             " schema version file into the produced JAR. Such flag must only be used for generating" +
@@ -1233,42 +1245,42 @@
             " the schema file will end up in the final artifact which is typically not desired. This" +
             " warning serves as a reminder to use room.exportSchemaResource cautiously."
 
-    val INVALID_GRADLE_PLUGIN_AND_SCHEMA_LOCATION_OPTION =
+    const val INVALID_GRADLE_PLUGIN_AND_SCHEMA_LOCATION_OPTION =
         "The Room Gradle plugin " +
             "(id 'androidx.room') cannot be used with an explicit use of the annotation processor" +
             "option `room.schemaLocation`, please remove the configuration of the option and " +
             "configure the schema location via the plugin project extension: " +
             "`room { schemaDirectory(...) }`."
 
-    val INVALID_DATABASE_VERSION = "Database version must be greater than 0"
+    const val INVALID_DATABASE_VERSION = "Database version must be greater than 0"
 
-    val JAVA_CODEGEN_ON_NON_ANDROID_TARGET =
+    const val JAVA_CODEGEN_ON_NON_ANDROID_TARGET =
         "Cannot generate Java targeting a non-Android " +
             "platform. To generate Java, you must only have Android as a target platform. " +
             "To process a non-Android target platform, you must enable Kotlin code " +
             "generation in KSP."
 
-    val INVALID_BLOCKING_DAO_FUNCTION_NON_ANDROID =
+    const val INVALID_BLOCKING_DAO_FUNCTION_NON_ANDROID =
         "Only suspend functions are allowed in DAOs" +
             " declared in source sets targeting non-Android platforms."
 
     val INVALID_KOTLIN_CODE_GEN_IN_JAVAC =
         "${Context.BooleanProcessorOptions.GENERATE_KOTLIN.argName} can only be enabled in KSP."
 
-    val RAW_QUERY_NOT_SUPPORTED_ON_NON_ANDROID =
+    const val RAW_QUERY_NOT_SUPPORTED_ON_NON_ANDROID =
         "@RawQuery annotated DAO functions are currently not supported in source sets targeting " +
             "non-Android platforms."
 
-    val MISSING_CONSTRUCTED_BY_ANNOTATION =
+    const val MISSING_CONSTRUCTED_BY_ANNOTATION =
         "The @Database class must be annotated with @ConstructedBy since the source is targeting " +
             "non-Android platforms."
 
-    val INVALID_CONSTRUCTED_BY_CLASS = "The @ConstructedBy 'value' must be a valid class."
+    const val INVALID_CONSTRUCTED_BY_CLASS = "The @ConstructedBy 'value' must be a valid class."
 
-    val INVALID_CONSTRUCTED_BY_NOT_OBJECT =
+    const val INVALID_CONSTRUCTED_BY_NOT_OBJECT =
         "The @ConstructedBy definition must be an 'object' declaration."
 
-    val INVALID_CONSTRUCTED_BY_NOT_EXPECT =
+    const val INVALID_CONSTRUCTED_BY_NOT_EXPECT =
         "The @ConstructedBy definition must be an 'expect' declaration."
 
     fun invalidConstructedBySuperInterface(expected: String) =
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/QueryFunctionProcessor.kt
similarity index 88%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/QueryFunctionProcessor.kt
index f01ca3d..1304860 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/QueryFunctionProcessor.kt
@@ -33,13 +33,13 @@
 import androidx.room.verifier.DatabaseVerificationErrors
 import androidx.room.verifier.DatabaseVerifier
 import androidx.room.vo.MapInfo
-import androidx.room.vo.QueryMethod
+import androidx.room.vo.QueryFunction
 import androidx.room.vo.QueryParameter
-import androidx.room.vo.ReadQueryMethod
+import androidx.room.vo.ReadQueryFunction
 import androidx.room.vo.Warning
-import androidx.room.vo.WriteQueryMethod
+import androidx.room.vo.WriteQueryFunction
 
-class QueryMethodProcessor(
+class QueryFunctionProcessor(
     baseContext: Context,
     val containing: XType,
     val executableElement: XMethodElement,
@@ -48,11 +48,11 @@
     val context = baseContext.fork(executableElement)
 
     /**
-     * The processing of the method might happen in multiple steps if we decide to rewrite the query
-     * after the first processing. To allow it while respecting the Context, it is implemented as a
-     * sub procedure in [InternalQueryProcessor].
+     * The processing of the function might happen in multiple steps if we decide to rewrite the
+     * query after the first processing. To allow it while respecting the Context, it is implemented
+     * as a sub procedure in [InternalQueryProcessor].
      */
-    fun process(): QueryMethod {
+    fun process(): QueryFunction {
         val annotation = executableElement.getAnnotation(Query::class)?.value
         context.checker.check(
             annotation != null,
@@ -76,7 +76,7 @@
             }
         // check if want to swap the query for a better one
         val finalResult =
-            if (initialResult is ReadQueryMethod) {
+            if (initialResult is ReadQueryFunction) {
                 val resultAdapter = initialResult.queryResultBinder.adapter
                 val originalQuery = initialResult.query
                 val finalQuery =
@@ -112,8 +112,8 @@
     val containing: XType,
     val dbVerifier: DatabaseVerifier? = null
 ) {
-    fun processQuery(input: String?): QueryMethod {
-        val delegate = MethodProcessorDelegate.createFor(context, containing, executableElement)
+    fun processQuery(input: String?): QueryFunction {
+        val delegate = FunctionProcessorDelegate.createFor(context, containing, executableElement)
         val returnType = delegate.extractReturnType()
 
         val returnsDeferredType = delegate.returnsDeferredType()
@@ -156,23 +156,23 @@
         context.checker.notUnbound(
             returnType,
             executableElement,
-            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_METHODS
+            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_FUNCTIONS
         )
 
         val isPreparedQuery = PREPARED_TYPES.contains(query.type)
-        val queryMethod =
+        val queryFunction =
             if (isPreparedQuery) {
-                getPreparedQueryMethod(delegate, returnType, query)
+                getPreparedQueryFunction(delegate, returnType, query)
             } else {
-                getQueryMethod(delegate, returnType, query)
+                getQueryFunction(delegate, returnType, query)
             }
 
-        return processQueryMethod(queryMethod)
+        return processQueryFunction(queryFunction)
     }
 
-    private fun processQueryMethod(queryMethod: QueryMethod): QueryMethod {
+    private fun processQueryFunction(queryFunction: QueryFunction): QueryFunction {
         val missing =
-            queryMethod.sectionToParamMapping.filter { it.second == null }.map { it.first.text }
+            queryFunction.sectionToParamMapping.filter { it.second == null }.map { it.first.text }
         if (missing.isNotEmpty()) {
             context.logger.e(
                 executableElement,
@@ -181,14 +181,19 @@
         }
 
         val unused =
-            queryMethod.parameters
-                .filterNot { param -> queryMethod.sectionToParamMapping.any { it.second == param } }
+            queryFunction.parameters
+                .filterNot { param ->
+                    queryFunction.sectionToParamMapping.any { it.second == param }
+                }
                 .map(QueryParameter::sqlName)
 
         if (unused.isNotEmpty()) {
-            context.logger.e(executableElement, ProcessorErrors.unusedQueryMethodParameter(unused))
+            context.logger.e(
+                executableElement,
+                ProcessorErrors.unusedQueryFunctionParameter(unused)
+            )
         }
-        return queryMethod
+        return queryFunction
     }
 
     private fun validateQuery(query: ParsedQuery) {
@@ -205,11 +210,11 @@
         }
     }
 
-    private fun getPreparedQueryMethod(
-        delegate: MethodProcessorDelegate,
+    private fun getPreparedQueryFunction(
+        delegate: FunctionProcessorDelegate,
         returnType: XType,
         query: ParsedQuery
-    ): WriteQueryMethod {
+    ): WriteQueryFunction {
         val resultBinder = delegate.findPreparedResultBinder(returnType, query)
         context.checker.check(
             resultBinder.adapter != null,
@@ -221,7 +226,7 @@
         )
 
         val parameters = delegate.extractQueryParams(query)
-        return WriteQueryMethod(
+        return WriteQueryFunction(
             element = executableElement,
             query = query,
             returnType = returnType,
@@ -231,11 +236,11 @@
     }
 
     @Suppress("DEPRECATION") // Due to MapInfo usage
-    private fun getQueryMethod(
-        delegate: MethodProcessorDelegate,
+    private fun getQueryFunction(
+        delegate: FunctionProcessorDelegate,
         returnType: XType,
         query: ParsedQuery
-    ): QueryMethod {
+    ): QueryFunction {
         val resultBinder =
             delegate.findResultBinder(returnType, query) {
                 delegate.executableElement.getAnnotation(androidx.room.MapInfo::class)?.let {
@@ -303,7 +308,7 @@
 
         val parameters = delegate.extractQueryParams(query)
 
-        return ReadQueryMethod(
+        return ReadQueryFunction(
             element = executableElement,
             query = query,
             returnType = returnType,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryFunctionProcessor.kt
similarity index 93%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryFunctionProcessor.kt
index 158cb27..6b7ecef 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryFunctionProcessor.kt
@@ -28,17 +28,17 @@
 import androidx.room.parser.SqlParser
 import androidx.room.processor.ProcessorErrors.RAW_QUERY_STRING_PARAMETER_REMOVED
 import androidx.room.vo.MapInfo
-import androidx.room.vo.RawQueryMethod
+import androidx.room.vo.RawQueryFunction
 
-class RawQueryMethodProcessor(
+class RawQueryFunctionProcessor(
     baseContext: Context,
     val containing: XType,
     val executableElement: XMethodElement
 ) {
     val context = baseContext.fork(executableElement)
 
-    fun process(): RawQueryMethod {
-        val delegate = MethodProcessorDelegate.createFor(context, containing, executableElement)
+    fun process(): RawQueryFunction {
+        val delegate = FunctionProcessorDelegate.createFor(context, containing, executableElement)
         val returnType = delegate.extractReturnType()
 
         context.checker.check(
@@ -50,7 +50,7 @@
         context.checker.notUnbound(
             returnType,
             executableElement,
-            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_METHODS
+            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_FUNCTIONS
         )
 
         val returnsDeferredType = delegate.returnsDeferredType()
@@ -91,8 +91,8 @@
 
         val runtimeQueryParam = findRuntimeQueryParameter(delegate.extractParams())
         val inTransaction = executableElement.hasAnnotation(Transaction::class)
-        val rawQueryMethod =
-            RawQueryMethod(
+        val rawQueryFunction =
+            RawQueryFunction(
                 element = executableElement,
                 observedTableNames = observedTableNames,
                 returnType = returnType,
@@ -102,11 +102,11 @@
             )
         // TODO: Lift this restriction, to allow for INSERT, UPDATE and DELETE raw statements.
         context.checker.check(
-            rawQueryMethod.returnsValue,
+            rawQueryFunction.returnsValue,
             executableElement,
             ProcessorErrors.RAW_QUERY_BAD_RETURN_TYPE
         )
-        return rawQueryMethod
+        return rawQueryFunction
     }
 
     private fun processObservedTables(): Set<String> {
@@ -151,7 +151,7 @@
 
     private fun findRuntimeQueryParameter(
         extractParams: List<XVariableElement>
-    ): RawQueryMethod.RuntimeQueryParameter? {
+    ): RawQueryFunction.RuntimeQueryParameter? {
         if (extractParams.size == 1 && !executableElement.isVarArgs()) {
             val param = extractParams.first().asMemberOf(containing)
             val processingEnv = context.processingEnv
@@ -167,7 +167,7 @@
 
             processingEnv.findType(RoomTypeNames.RAW_QUERY)?.let { rawQueryType ->
                 if (rawQueryType.isAssignableFrom(param)) {
-                    return RawQueryMethod.RuntimeQueryParameter(
+                    return RawQueryFunction.RuntimeQueryParameter(
                         paramName = extractParams[0].name,
                         typeName = rawQueryType.asTypeName()
                     )
@@ -176,7 +176,7 @@
 
             processingEnv.findType(SupportDbTypeNames.QUERY)?.let { supportQueryType ->
                 if (supportQueryType.isAssignableFrom(param)) {
-                    return RawQueryMethod.RuntimeQueryParameter(
+                    return RawQueryFunction.RuntimeQueryParameter(
                         paramName = extractParams[0].name,
                         typeName = supportQueryType.asTypeName()
                     )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutFunctionProcessor.kt
similarity index 92%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutFunctionProcessor.kt
index 6507652..2291a2c 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutFunctionProcessor.kt
@@ -27,14 +27,15 @@
 import androidx.room.vo.findFieldByColumnName
 import kotlin.reflect.KClass
 
-/** Common functionality for shortcut method processors */
-class ShortcutMethodProcessor(
+/** Common functionality for shortcut function processors */
+class ShortcutFunctionProcessor(
     baseContext: Context,
     val containing: XType,
     val executableElement: XMethodElement
 ) {
     val context = baseContext.fork(executableElement)
-    private val delegate = MethodProcessorDelegate.createFor(context, containing, executableElement)
+    private val delegate =
+        FunctionProcessorDelegate.createFor(context, containing, executableElement)
 
     fun <T : Annotation> extractAnnotation(klass: KClass<T>, errorMsg: String): XAnnotationBox<T>? {
         val annotation = executableElement.getAnnotation(klass)
@@ -87,7 +88,7 @@
                 if (targetTypeElement == null) {
                     context.logger.e(
                         executableElement,
-                        ProcessorErrors.INVALID_TARGET_ENTITY_IN_SHORTCUT_METHOD
+                        ProcessorErrors.INVALID_TARGET_ENTITY_IN_SHORTCUT_FUNCTION
                     )
                     null
                 } else {
@@ -96,7 +97,7 @@
                         onInvalid = {
                             context.logger.e(
                                 executableElement,
-                                ProcessorErrors.INVALID_TARGET_ENTITY_IN_SHORTCUT_METHOD
+                                ProcessorErrors.INVALID_TARGET_ENTITY_IN_SHORTCUT_FUNCTION
                             )
                             return emptyMap<String, ShortcutEntity>() to emptyList()
                         }
@@ -138,7 +139,7 @@
                         if (pojoTypeElement == null) {
                             context.logger.e(
                                 targetEntity.element,
-                                ProcessorErrors.shortcutMethodArgumentMustBeAClass(
+                                ProcessorErrors.shortcutFunctionArgumentMustBeAClass(
                                     typeName =
                                         param.pojoType.asTypeName().toString(context.codeLanguage)
                                 )
@@ -229,12 +230,12 @@
             null
         }
 
-    fun findInsertMethodBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
-        delegate.findInsertMethodBinder(returnType, params)
+    fun findInsertFunctionBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
+        delegate.findInsertFunctionBinder(returnType, params)
 
-    fun findUpsertMethodBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
-        delegate.findUpsertMethodBinder(returnType, params)
+    fun findUpsertFunctionBinder(returnType: XType, params: List<ShortcutQueryParameter>) =
+        delegate.findUpsertFunctionBinder(returnType, params)
 
-    fun findDeleteOrUpdateMethodBinder(returnType: XType) =
-        delegate.findDeleteOrUpdateMethodBinder(returnType)
+    fun findDeleteOrUpdateFunctionBinder(returnType: XType) =
+        delegate.findDeleteOrUpdateFunctionBinder(returnType)
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt
index 9b3dfdf..765526f 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt
@@ -36,7 +36,7 @@
             context.logger.e(
                 element = element,
                 msg =
-                    ProcessorErrors.nullableParamInShortcutMethod(
+                    ProcessorErrors.nullableParamInShortcutFunction(
                         asMember.asTypeName().toString(context.codeLanguage)
                     )
             )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionFunctionProcessor.kt
similarity index 83%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionFunctionProcessor.kt
index 8667172..3994d4f 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionFunctionProcessor.kt
@@ -21,9 +21,9 @@
 import androidx.room.compiler.processing.XType
 import androidx.room.compiler.processing.XTypeElement
 import androidx.room.ext.DEFERRED_TYPES
-import androidx.room.vo.TransactionMethod
+import androidx.room.vo.TransactionFunction
 
-class TransactionMethodProcessor(
+class TransactionFunctionProcessor(
     baseContext: Context,
     val containingElement: XTypeElement,
     val containingType: XType,
@@ -32,14 +32,15 @@
 
     val context = baseContext.fork(executableElement)
 
-    fun process(): TransactionMethod {
-        val delegate = MethodProcessorDelegate.createFor(context, containingType, executableElement)
+    fun process(): TransactionFunction {
+        val delegate =
+            FunctionProcessorDelegate.createFor(context, containingType, executableElement)
         val hasKotlinDefaultImpl = executableElement.hasKotlinDefaultImpl()
         context.checker.check(
             executableElement.isOverrideableIgnoringContainer() &&
                 (!executableElement.isAbstract() || hasKotlinDefaultImpl),
             executableElement,
-            ProcessorErrors.TRANSACTION_METHOD_MODIFIERS
+            ProcessorErrors.TRANSACTION_FUNCTION_MODIFIERS
         )
 
         val returnType = delegate.extractReturnType()
@@ -54,7 +55,7 @@
             }
         if (deferredReturnTypeName != null) {
             context.logger.e(
-                ProcessorErrors.transactionMethodAsync(
+                ProcessorErrors.transactionFunctionAsync(
                     deferredReturnTypeName.toString(context.codeLanguage)
                 ),
                 executableElement
@@ -76,10 +77,10 @@
         val callType =
             when {
                 containingElement.isInterface() && executableElement.isJavaDefault() ->
-                    TransactionMethod.CallType.DEFAULT_JAVA8
+                    TransactionFunction.CallType.DEFAULT_JAVA8
                 containingElement.isInterface() && hasKotlinDefaultImpl ->
-                    TransactionMethod.CallType.DEFAULT_KOTLIN
-                else -> TransactionMethod.CallType.CONCRETE
+                    TransactionFunction.CallType.DEFAULT_KOTLIN
+                else -> TransactionFunction.CallType.CONCRETE
             }
 
         val parameters = delegate.extractParams()
@@ -93,12 +94,12 @@
                 }
             }
 
-        return TransactionMethod(
+        return TransactionFunction(
             element = executableElement,
             returnType = returnType,
             parameterNames = processedParamNames,
             callType = callType,
-            methodBinder = delegate.findTransactionMethodBinder(callType)
+            functionBinder = delegate.findTransactionFunctionBinder(callType)
         )
     }
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateFunctionProcessor.kt
similarity index 87%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateFunctionProcessor.kt
index 15c1dd8..704b25d 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateFunctionProcessor.kt
@@ -20,18 +20,18 @@
 import androidx.room.Update
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.vo.UpdateMethod
+import androidx.room.vo.UpdateFunction
 import androidx.room.vo.findFieldByColumnName
 
-class UpdateMethodProcessor(
+class UpdateFunctionProcessor(
     baseContext: Context,
     val containing: XType,
     val executableElement: XMethodElement
 ) {
     val context = baseContext.fork(executableElement)
 
-    fun process(): UpdateMethod {
-        val delegate = ShortcutMethodProcessor(context, containing, executableElement)
+    fun process(): UpdateFunction {
+        val delegate = ShortcutFunctionProcessor(context, containing, executableElement)
         val annotation =
             delegate.extractAnnotation(Update::class, ProcessorErrors.MISSING_UPDATE_ANNOTATION)
 
@@ -63,19 +63,19 @@
             )
 
         val returnType = delegate.extractReturnType()
-        val methodBinder = delegate.findDeleteOrUpdateMethodBinder(returnType)
+        val functionBinder = delegate.findDeleteOrUpdateFunctionBinder(returnType)
 
         context.checker.check(
-            methodBinder.adapter != null,
+            functionBinder.adapter != null,
             executableElement,
             ProcessorErrors.CANNOT_FIND_UPDATE_RESULT_ADAPTER
         )
 
-        return UpdateMethod(
+        return UpdateFunction(
             element = delegate.executableElement,
             entities = entities,
             onConflictStrategy = onConflict,
-            methodBinder = methodBinder,
+            functionBinder = functionBinder,
             parameters = params
         )
     }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertMethodProcessor.kt b/room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertFunctionProcessor.kt
similarity index 89%
rename from room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertMethodProcessor.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertFunctionProcessor.kt
index b65836c..cf4eff5 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertMethodProcessor.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertFunctionProcessor.kt
@@ -19,18 +19,18 @@
 import androidx.room.Upsert
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.vo.UpsertMethod
+import androidx.room.vo.UpsertFunction
 import androidx.room.vo.findFieldByColumnName
 
-class UpsertMethodProcessor(
+class UpsertFunctionProcessor(
     baseContext: Context,
     val containing: XType,
     val executableElement: XMethodElement
 ) {
     val context = baseContext.fork(executableElement)
 
-    fun process(): UpsertMethod {
-        val delegate = ShortcutMethodProcessor(context, containing, executableElement)
+    fun process(): UpsertFunction {
+        val delegate = ShortcutFunctionProcessor(context, containing, executableElement)
 
         val annotation =
             delegate.extractAnnotation(Upsert::class, ProcessorErrors.MISSING_UPSERT_ANNOTATION)
@@ -39,7 +39,7 @@
         context.checker.notUnbound(
             returnType,
             executableElement,
-            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_UPSERT_METHODS
+            ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_UPSERT_FUNCTIONS
         )
 
         val (entities, params) =
@@ -79,20 +79,20 @@
                 }
             )
 
-        val methodBinder = delegate.findUpsertMethodBinder(returnType, params)
+        val functionBinder = delegate.findUpsertFunctionBinder(returnType, params)
 
         context.checker.check(
-            methodBinder.adapter != null,
+            functionBinder.adapter != null,
             executableElement,
             ProcessorErrors.CANNOT_FIND_UPSERT_RESULT_ADAPTER
         )
 
-        return UpsertMethod(
+        return UpsertFunction(
             element = executableElement,
             returnType = returnType,
             entities = entities,
             parameters = params,
-            methodBinder = methodBinder
+            functionBinder = functionBinder
         )
     }
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveMethodDelegateBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveFunctionDelegateBinder.kt
similarity index 86%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveMethodDelegateBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveFunctionDelegateBinder.kt
index 32c2d77..07817be 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveMethodDelegateBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveFunctionDelegateBinder.kt
@@ -22,18 +22,18 @@
 import androidx.room.compiler.codegen.unbox
 import androidx.room.compiler.processing.XType
 import androidx.room.compiler.processing.isVoid
-import androidx.room.vo.KotlinBoxedPrimitiveMethodDelegate
+import androidx.room.vo.KotlinBoxedPrimitiveFunctionDelegate
 
 /**
- * Method binder that delegates to a sibling DAO function in a Kotlin interface or abstract class
+ * Function binder that delegates to a sibling DAO function in a Kotlin interface or abstract class
  * and specifically to a sibling function with unboxed primitive parameters.
  *
- * @see [KotlinBoxedPrimitiveMethodDelegate]
+ * @see [KotlinBoxedPrimitiveFunctionDelegate]
  */
-object KotlinBoxedPrimitiveMethodDelegateBinder {
+object KotlinBoxedPrimitiveFunctionDelegateBinder {
 
     fun execute(
-        methodName: String,
+        functionName: String,
         returnType: XType,
         parameters: List<Pair<XTypeName, String>>,
         scope: CodeGenScope
@@ -45,7 +45,7 @@
                     append("return ")
                 }
                 append("%L(")
-                params.add(methodName)
+                params.add(functionName)
                 parameters.forEachIndexed { i, (typeName, name) ->
                     if (typeName.isPrimitive) {
                         append("(%T) %L")
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultMethodDelegateBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultFunctionDelegateBinder.kt
similarity index 85%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultMethodDelegateBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultFunctionDelegateBinder.kt
index a83c58f..a1beae3 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultMethodDelegateBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultFunctionDelegateBinder.kt
@@ -22,19 +22,19 @@
 import androidx.room.compiler.processing.XType
 import androidx.room.compiler.processing.isVoid
 import androidx.room.ext.DEFAULT_IMPLS_CLASS_NAME
-import androidx.room.vo.KotlinDefaultMethodDelegate
+import androidx.room.vo.KotlinDefaultFunctionDelegate
 
 /**
- * Method binder that delegates to concrete DAO function in a Kotlin interface, specifically to a
+ * Function binder that delegates to concrete DAO function in a Kotlin interface, specifically to a
  * function where the implementation is in the DefaultImpl Kotlin generated class.
  *
- * @see [KotlinDefaultMethodDelegate]
+ * @see [KotlinDefaultFunctionDelegate]
  */
-object KotlinDefaultMethodDelegateBinder {
+object KotlinDefaultFunctionDelegateBinder {
     fun executeAndReturn(
         daoName: XClassName,
         daoImplName: XClassName,
-        methodName: String,
+        functionName: String,
         returnType: XType,
         parameterNames: List<String>,
         scope: CodeGenScope
@@ -48,7 +48,7 @@
                 append("%T.%L.%L(%T.this")
                 params.add(daoName)
                 params.add(DEFAULT_IMPLS_CLASS_NAME)
-                params.add(methodName)
+                params.add(functionName)
                 params.add(daoImplName)
                 parameterNames.forEach {
                     append(", %L")
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
index 31bb21d..65790cc 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
@@ -90,18 +90,18 @@
 import androidx.room.solver.query.result.SingleColumnRowAdapter
 import androidx.room.solver.query.result.SingleItemQueryResultAdapter
 import androidx.room.solver.query.result.SingleNamedColumnRowAdapter
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
-import androidx.room.solver.shortcut.binderprovider.DeleteOrUpdateMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureDeleteOrUpdateMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureInsertOrUpsertMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.InsertOrUpsertMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.InstantDeleteOrUpdateMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.InstantInsertOrUpsertMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.RxCallableDeleteOrUpdateMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.RxCallableInsertOrUpsertMethodBinderProvider
-import androidx.room.solver.shortcut.result.DeleteOrUpdateMethodAdapter
-import androidx.room.solver.shortcut.result.InsertOrUpsertMethodAdapter
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
+import androidx.room.solver.shortcut.binderprovider.DeleteOrUpdateFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureInsertOrUpsertFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.InsertOrUpsertFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.InstantDeleteOrUpdateFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.InstantInsertOrUpsertFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.RxCallableDeleteOrUpdateFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.RxCallableInsertOrUpsertFunctionBinderProvider
+import androidx.room.solver.shortcut.result.DeleteOrUpdateFunctionAdapter
+import androidx.room.solver.shortcut.result.InsertOrUpsertFunctionAdapter
 import androidx.room.solver.types.BoxedBooleanToBoxedIntConverter
 import androidx.room.solver.types.BoxedPrimitiveColumnTypeAdapter
 import androidx.room.solver.types.ByteArrayColumnTypeAdapter
@@ -229,18 +229,18 @@
             add(InstantPreparedQueryResultBinderProvider(context))
         }
 
-    private val insertOrUpsertBinderProviders: List<InsertOrUpsertMethodBinderProvider> =
-        mutableListOf<InsertOrUpsertMethodBinderProvider>().apply {
-            addAll(RxCallableInsertOrUpsertMethodBinderProvider.getAll(context))
-            add(GuavaListenableFutureInsertOrUpsertMethodBinderProvider(context))
-            add(InstantInsertOrUpsertMethodBinderProvider(context))
+    private val insertOrUpsertBinderProviders: List<InsertOrUpsertFunctionBinderProvider> =
+        mutableListOf<InsertOrUpsertFunctionBinderProvider>().apply {
+            addAll(RxCallableInsertOrUpsertFunctionBinderProvider.getAll(context))
+            add(GuavaListenableFutureInsertOrUpsertFunctionBinderProvider(context))
+            add(InstantInsertOrUpsertFunctionBinderProvider(context))
         }
 
-    private val deleteOrUpdateBinderProvider: List<DeleteOrUpdateMethodBinderProvider> =
-        mutableListOf<DeleteOrUpdateMethodBinderProvider>().apply {
-            addAll(RxCallableDeleteOrUpdateMethodBinderProvider.getAll(context))
-            add(GuavaListenableFutureDeleteOrUpdateMethodBinderProvider(context))
-            add(InstantDeleteOrUpdateMethodBinderProvider(context))
+    private val deleteOrUpdateBinderProvider: List<DeleteOrUpdateFunctionBinderProvider> =
+        mutableListOf<DeleteOrUpdateFunctionBinderProvider>().apply {
+            addAll(RxCallableDeleteOrUpdateFunctionBinderProvider.getAll(context))
+            add(GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider(context))
+            add(InstantDeleteOrUpdateFunctionBinderProvider(context))
         }
 
     /** Searches 1 way to bind a value into a statement. */
@@ -413,23 +413,23 @@
         }
     }
 
-    fun findDeleteOrUpdateMethodBinder(typeMirror: XType): DeleteOrUpdateMethodBinder {
+    fun findDeleteOrUpdateFunctionBinder(typeMirror: XType): DeleteOrUpdateFunctionBinder {
         return deleteOrUpdateBinderProvider.first { it.matches(typeMirror) }.provide(typeMirror)
     }
 
-    fun findInsertMethodBinder(
+    fun findInsertFunctionBinder(
         typeMirror: XType,
         params: List<ShortcutQueryParameter>
-    ): InsertOrUpsertMethodBinder {
+    ): InsertOrUpsertFunctionBinder {
         return insertOrUpsertBinderProviders
             .first { it.matches(typeMirror) }
             .provide(typeMirror, params, false)
     }
 
-    fun findUpsertMethodBinder(
+    fun findUpsertFunctionBinder(
         typeMirror: XType,
         params: List<ShortcutQueryParameter>
-    ): InsertOrUpsertMethodBinder {
+    ): InsertOrUpsertFunctionBinder {
         return insertOrUpsertBinderProviders
             .first { it.matches(typeMirror) }
             .provide(typeMirror, params, true)
@@ -465,22 +465,22 @@
     fun findPreparedQueryResultAdapter(typeMirror: XType, query: ParsedQuery) =
         PreparedQueryResultAdapter.create(typeMirror, query.type)
 
-    fun findDeleteOrUpdateAdapter(typeMirror: XType): DeleteOrUpdateMethodAdapter? {
-        return DeleteOrUpdateMethodAdapter.create(typeMirror)
+    fun findDeleteOrUpdateAdapter(typeMirror: XType): DeleteOrUpdateFunctionAdapter? {
+        return DeleteOrUpdateFunctionAdapter.create(typeMirror)
     }
 
     fun findInsertAdapter(
         typeMirror: XType,
         params: List<ShortcutQueryParameter>
-    ): InsertOrUpsertMethodAdapter? {
-        return InsertOrUpsertMethodAdapter.createInsert(context, typeMirror, params)
+    ): InsertOrUpsertFunctionAdapter? {
+        return InsertOrUpsertFunctionAdapter.createInsert(context, typeMirror, params)
     }
 
     fun findUpsertAdapter(
         typeMirror: XType,
         params: List<ShortcutQueryParameter>
-    ): InsertOrUpsertMethodAdapter? {
-        return InsertOrUpsertMethodAdapter.createUpsert(context, typeMirror, params)
+    ): InsertOrUpsertFunctionAdapter? {
+        return InsertOrUpsertFunctionAdapter.createUpsert(context, typeMirror, params)
     }
 
     fun findQueryResultAdapter(
@@ -766,7 +766,7 @@
         if (collectionType.nullability != XNullability.NONNULL) {
             context.logger.w(
                 Warning.UNNECESSARY_NULLABILITY_IN_DAO_RETURN_TYPE,
-                ProcessorErrors.nullableCollectionOrArrayReturnTypeInDaoMethod(
+                ProcessorErrors.nullableCollectionOrArrayReturnTypeInDaoFunction(
                     searchingType.asTypeName().toString(context.codeLanguage),
                     typeKeyword
                 )
@@ -777,7 +777,7 @@
         if (arrayComponentType != null && arrayComponentType.nullability != XNullability.NONNULL) {
             context.logger.w(
                 Warning.UNNECESSARY_NULLABILITY_IN_DAO_RETURN_TYPE,
-                ProcessorErrors.nullableComponentInDaoMethodReturnType(
+                ProcessorErrors.nullableComponentInDaoFunctionReturnType(
                     searchingType.asTypeName().toString(context.codeLanguage)
                 )
             )
@@ -788,7 +788,7 @@
             if (typeArg.nullability != XNullability.NONNULL) {
                 context.logger.w(
                     Warning.UNNECESSARY_NULLABILITY_IN_DAO_RETURN_TYPE,
-                    ProcessorErrors.nullableComponentInDaoMethodReturnType(
+                    ProcessorErrors.nullableComponentInDaoFunctionReturnType(
                         searchingType.asTypeName().toString(context.codeLanguage)
                     )
                 )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineDeleteOrUpdateMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineDeleteOrUpdateFunctionBinder.kt
similarity index 91%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineDeleteOrUpdateMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineDeleteOrUpdateFunctionBinder.kt
index 348f3a1..4799df2 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineDeleteOrUpdateMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineDeleteOrUpdateFunctionBinder.kt
@@ -26,15 +26,15 @@
 import androidx.room.ext.RoomMemberNames.DB_UTIL_PERFORM_SUSPENDING
 import androidx.room.ext.SQLiteDriverTypeNames
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.DeleteOrUpdateMethodAdapter
+import androidx.room.solver.shortcut.result.DeleteOrUpdateFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
 /** Binder for suspending delete and update methods. */
-class CoroutineDeleteOrUpdateMethodBinder(
+class CoroutineDeleteOrUpdateFunctionBinder(
     val typeArg: XType,
-    adapter: DeleteOrUpdateMethodAdapter?,
+    adapter: DeleteOrUpdateFunctionAdapter?,
     private val continuationParamName: String
-) : DeleteOrUpdateMethodBinder(adapter) {
+) : DeleteOrUpdateFunctionBinder(adapter) {
 
     override fun convertAndReturn(
         parameters: List<ShortcutQueryParameter>,
@@ -62,7 +62,7 @@
                             javaLambdaSyntaxAvailable = scope.javaLambdaSyntaxAvailable
                         ) {
                         override fun XCodeBlock.Builder.body(scope: CodeGenScope) {
-                            adapter.generateMethodBody(
+                            adapter.generateFunctionBody(
                                 scope = scope,
                                 parameters = parameters,
                                 adapters = adapters,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineInsertOrUpsertMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineInsertOrUpsertFunctionBinder.kt
similarity index 91%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineInsertOrUpsertMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineInsertOrUpsertFunctionBinder.kt
index e8043e3..dae6d52b 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineInsertOrUpsertMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CoroutineInsertOrUpsertFunctionBinder.kt
@@ -25,15 +25,15 @@
 import androidx.room.ext.RoomMemberNames.DB_UTIL_PERFORM_SUSPENDING
 import androidx.room.ext.SQLiteDriverTypeNames
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.InsertOrUpsertMethodAdapter
+import androidx.room.solver.shortcut.result.InsertOrUpsertFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
 /** Binder for suspending insert or upsert methods. */
-class CoroutineInsertOrUpsertMethodBinder(
+class CoroutineInsertOrUpsertFunctionBinder(
     val typeArg: XType,
-    adapter: InsertOrUpsertMethodAdapter?,
+    adapter: InsertOrUpsertFunctionAdapter?,
     private val continuationParamName: String
-) : InsertOrUpsertMethodBinder(adapter) {
+) : InsertOrUpsertFunctionBinder(adapter) {
 
     override fun convertAndReturn(
         parameters: List<ShortcutQueryParameter>,
@@ -61,7 +61,7 @@
                             javaLambdaSyntaxAvailable = scope.javaLambdaSyntaxAvailable
                         ) {
                         override fun XCodeBlock.Builder.body(scope: CodeGenScope) {
-                            adapter.generateMethodBody(
+                            adapter.generateFunctionBody(
                                 scope = scope,
                                 parameters = parameters,
                                 adapters = adapters,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateFunctionBinder.kt
similarity index 72%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateFunctionBinder.kt
index 25342d5..525256e 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateFunctionBinder.kt
@@ -19,17 +19,18 @@
 import androidx.room.compiler.codegen.XPropertySpec
 import androidx.room.compiler.codegen.XTypeSpec
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.DeleteOrUpdateMethodAdapter
+import androidx.room.solver.shortcut.result.DeleteOrUpdateFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
 /**
- * Connects the delete or update method, the database and the [DeleteOrUpdateMethodAdapter].
+ * Connects the delete or update method, the database and the [DeleteOrUpdateFunctionAdapter].
  *
- * The default implementation is [InstantDeleteOrUpdateMethodBinder] that executes the delete/update
- * synchronously. If the delete/update is deferred, rather than synchronously, alternatives
- * implementations can be implemented using this interface (e.g. RxJava, coroutines etc).
+ * The default implementation is [InstantDeleteOrUpdateFunctionBinder] that executes the
+ * delete/update synchronously. If the delete/update is deferred, rather than synchronously,
+ * alternatives implementations can be implemented using this interface (e.g. RxJava, coroutines
+ * etc).
  */
-abstract class DeleteOrUpdateMethodBinder(val adapter: DeleteOrUpdateMethodAdapter?) {
+abstract class DeleteOrUpdateFunctionBinder(val adapter: DeleteOrUpdateFunctionAdapter?) {
 
     /**
      * Received the delete/update method parameters, the adapters and generates the code that runs
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InsertOrUpsertMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InsertOrUpsertFunctionBinder.kt
similarity index 85%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InsertOrUpsertMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InsertOrUpsertFunctionBinder.kt
index 67fb0fd..fb180a4 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InsertOrUpsertMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InsertOrUpsertFunctionBinder.kt
@@ -18,11 +18,11 @@
 
 import androidx.room.compiler.codegen.XPropertySpec
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.InsertOrUpsertMethodAdapter
+import androidx.room.solver.shortcut.result.InsertOrUpsertFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
-/** Connects the insert and upsert method, the database and the [InsertOrUpsertMethodAdapter]. */
-abstract class InsertOrUpsertMethodBinder(val adapter: InsertOrUpsertMethodAdapter?) {
+/** Connects the insert and upsert method, the database and the [InsertOrUpsertFunctionAdapter]. */
+abstract class InsertOrUpsertFunctionBinder(val adapter: InsertOrUpsertFunctionAdapter?) {
 
     /**
      * Received an insert or upsert method parameters, their adapters and generations the code that
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateFunctionBinder.kt
similarity index 92%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateFunctionBinder.kt
index 34e4967..6dcbdb3 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateFunctionBinder.kt
@@ -27,12 +27,12 @@
 import androidx.room.ext.SQLiteDriverTypeNames
 import androidx.room.ext.isNotVoid
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.DeleteOrUpdateMethodAdapter
+import androidx.room.solver.shortcut.result.DeleteOrUpdateFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
 /** Binder that knows how to write instant (blocking) delete and update methods. */
-class InstantDeleteOrUpdateMethodBinder(adapter: DeleteOrUpdateMethodAdapter?) :
-    DeleteOrUpdateMethodBinder(adapter) {
+class InstantDeleteOrUpdateFunctionBinder(adapter: DeleteOrUpdateFunctionAdapter?) :
+    DeleteOrUpdateFunctionBinder(adapter) {
 
     override fun convertAndReturn(
         parameters: List<ShortcutQueryParameter>,
@@ -59,7 +59,7 @@
                             javaLambdaSyntaxAvailable = scope.javaLambdaSyntaxAvailable
                         ) {
                         override fun XCodeBlock.Builder.body(scope: CodeGenScope) {
-                            adapter.generateMethodBody(
+                            adapter.generateFunctionBody(
                                 scope = scope,
                                 parameters = parameters,
                                 adapters = adapters,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertOrUpsertMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertOrUpsertFunctionBinder.kt
similarity index 91%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertOrUpsertMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertOrUpsertFunctionBinder.kt
index 322e206..a740eeb 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertOrUpsertMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertOrUpsertFunctionBinder.kt
@@ -26,12 +26,12 @@
 import androidx.room.ext.SQLiteDriverTypeNames
 import androidx.room.ext.isNotVoid
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.InsertOrUpsertMethodAdapter
+import androidx.room.solver.shortcut.result.InsertOrUpsertFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
 /** Binder that knows how to write instant (blocking) insert or upsert methods. */
-class InstantInsertOrUpsertMethodBinder(adapter: InsertOrUpsertMethodAdapter?) :
-    InsertOrUpsertMethodBinder(adapter) {
+class InstantInsertOrUpsertFunctionBinder(adapter: InsertOrUpsertFunctionAdapter?) :
+    InsertOrUpsertFunctionBinder(adapter) {
 
     override fun convertAndReturn(
         parameters: List<ShortcutQueryParameter>,
@@ -58,7 +58,7 @@
                             javaLambdaSyntaxAvailable = scope.javaLambdaSyntaxAvailable
                         ) {
                         override fun XCodeBlock.Builder.body(scope: CodeGenScope) {
-                            adapter.generateMethodBody(
+                            adapter.generateFunctionBody(
                                 scope = scope,
                                 parameters = parameters,
                                 adapters = adapters,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaDeleteOrUpdateMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaDeleteOrUpdateFunctionBinder.kt
similarity index 91%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaDeleteOrUpdateMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaDeleteOrUpdateFunctionBinder.kt
index 3cdca44..1d01edb 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaDeleteOrUpdateMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaDeleteOrUpdateFunctionBinder.kt
@@ -25,7 +25,7 @@
 import androidx.room.ext.LambdaSpec
 import androidx.room.ext.SQLiteDriverTypeNames
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.DeleteOrUpdateMethodAdapter
+import androidx.room.solver.shortcut.result.DeleteOrUpdateFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
 /**
@@ -34,11 +34,11 @@
  * This binder generates code that invokes [functionName] with a lambda whose body will delegate to
  * the given [adapter].
  */
-class LambdaDeleteOrUpdateMethodBinder(
+class LambdaDeleteOrUpdateFunctionBinder(
     val typeArg: XType,
     val functionName: XMemberName,
-    adapter: DeleteOrUpdateMethodAdapter?
-) : DeleteOrUpdateMethodBinder(adapter) {
+    adapter: DeleteOrUpdateFunctionAdapter?
+) : DeleteOrUpdateFunctionBinder(adapter) {
     override fun convertAndReturn(
         parameters: List<ShortcutQueryParameter>,
         adapters: Map<String, Pair<XPropertySpec, XTypeSpec>>,
@@ -64,7 +64,7 @@
                             javaLambdaSyntaxAvailable = scope.javaLambdaSyntaxAvailable
                         ) {
                         override fun XCodeBlock.Builder.body(scope: CodeGenScope) {
-                            adapter.generateMethodBody(
+                            adapter.generateFunctionBody(
                                 scope = scope,
                                 parameters = parameters,
                                 adapters = adapters,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaInsertOrUpsertMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaInsertOrUpsertFunctionBinder.kt
similarity index 91%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaInsertOrUpsertMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaInsertOrUpsertFunctionBinder.kt
index af0a2ea..2619f3d 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaInsertOrUpsertMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/LambdaInsertOrUpsertFunctionBinder.kt
@@ -24,7 +24,7 @@
 import androidx.room.ext.LambdaSpec
 import androidx.room.ext.SQLiteDriverTypeNames
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.shortcut.result.InsertOrUpsertMethodAdapter
+import androidx.room.solver.shortcut.result.InsertOrUpsertFunctionAdapter
 import androidx.room.vo.ShortcutQueryParameter
 
 /**
@@ -33,11 +33,11 @@
  * This binder generates code that invokes [functionName] with a lambda whose body will delegate to
  * the given [adapter].
  */
-class LambdaInsertOrUpsertMethodBinder(
+class LambdaInsertOrUpsertFunctionBinder(
     val typeArg: XType,
     val functionName: XMemberName,
-    adapter: InsertOrUpsertMethodAdapter?
-) : InsertOrUpsertMethodBinder(adapter) {
+    adapter: InsertOrUpsertFunctionAdapter?
+) : InsertOrUpsertFunctionBinder(adapter) {
 
     override fun convertAndReturn(
         parameters: List<ShortcutQueryParameter>,
@@ -64,7 +64,7 @@
                             javaLambdaSyntaxAvailable = scope.javaLambdaSyntaxAvailable
                         ) {
                         override fun XCodeBlock.Builder.body(scope: CodeGenScope) {
-                            adapter.generateMethodBody(
+                            adapter.generateFunctionBody(
                                 scope = scope,
                                 parameters = parameters,
                                 adapters = adapters,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/DeleteOrUpdateMethodBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/DeleteOrUpdateFunctionBinderProvider.kt
similarity index 70%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/DeleteOrUpdateMethodBinderProvider.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/DeleteOrUpdateFunctionBinderProvider.kt
index bf22009..d6d5215 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/DeleteOrUpdateMethodBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/DeleteOrUpdateFunctionBinderProvider.kt
@@ -17,15 +17,15 @@
 package androidx.room.solver.shortcut.binderprovider
 
 import androidx.room.compiler.processing.XType
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
-import androidx.room.solver.shortcut.result.DeleteOrUpdateMethodAdapter
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
+import androidx.room.solver.shortcut.result.DeleteOrUpdateFunctionAdapter
 
 /** Provider for delete or update binders */
-interface DeleteOrUpdateMethodBinderProvider {
+interface DeleteOrUpdateFunctionBinderProvider {
 
-    /** Check whether the [XType] can be handled by the [DeleteOrUpdateMethodBinder] */
+    /** Check whether the [XType] can be handled by the [DeleteOrUpdateFunctionBinder] */
     fun matches(declared: XType): Boolean
 
-    /** Provider of [DeleteOrUpdateMethodAdapter], based on the [XType] */
-    fun provide(declared: XType): DeleteOrUpdateMethodBinder
+    /** Provider of [DeleteOrUpdateFunctionAdapter], based on the [XType] */
+    fun provide(declared: XType): DeleteOrUpdateFunctionBinder
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider.kt
similarity index 85%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider.kt
index bca756c..88e0680 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider.kt
@@ -24,12 +24,12 @@
 import androidx.room.ext.RoomGuavaTypeNames.GUAVA_ROOM_MARKER
 import androidx.room.processor.Context
 import androidx.room.processor.ProcessorErrors
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
-import androidx.room.solver.shortcut.binder.LambdaDeleteOrUpdateMethodBinder
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
+import androidx.room.solver.shortcut.binder.LambdaDeleteOrUpdateFunctionBinder
 
 /** Provider for Guava ListenableFuture binders. */
-class GuavaListenableFutureDeleteOrUpdateMethodBinderProvider(val context: Context) :
-    DeleteOrUpdateMethodBinderProvider {
+class GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider(val context: Context) :
+    DeleteOrUpdateFunctionBinderProvider {
 
     private val hasGuavaRoom by lazy {
         context.processingEnv.getElementsFromPackage(GUAVA_ROOM_MARKER.packageName).isNotEmpty()
@@ -39,7 +39,7 @@
         declared.typeArguments.size == 1 &&
             declared.rawType.asTypeName() == GuavaUtilConcurrentTypeNames.LISTENABLE_FUTURE
 
-    override fun provide(declared: XType): DeleteOrUpdateMethodBinder {
+    override fun provide(declared: XType): DeleteOrUpdateFunctionBinder {
         if (!hasGuavaRoom) {
             context.logger.e(ProcessorErrors.MISSING_ROOM_GUAVA_ARTIFACT)
         }
@@ -49,7 +49,7 @@
             context.logger.e(ProcessorErrors.NONNULL_VOID)
         }
 
-        return LambdaDeleteOrUpdateMethodBinder(
+        return LambdaDeleteOrUpdateFunctionBinder(
             typeArg = typeArg,
             functionName = GUAVA_ROOM_CREATE_LISTENABLE_FUTURE,
             adapter = context.typeAdapterStore.findDeleteOrUpdateAdapter(typeArg)
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertOrUpsertMethodBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertOrUpsertFunctionBinderProvider.kt
similarity index 88%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertOrUpsertMethodBinderProvider.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertOrUpsertFunctionBinderProvider.kt
index 0153c10..3a67fa9 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertOrUpsertMethodBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertOrUpsertFunctionBinderProvider.kt
@@ -24,13 +24,13 @@
 import androidx.room.ext.RoomGuavaTypeNames.GUAVA_ROOM_MARKER
 import androidx.room.processor.Context
 import androidx.room.processor.ProcessorErrors
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
-import androidx.room.solver.shortcut.binder.LambdaInsertOrUpsertMethodBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
+import androidx.room.solver.shortcut.binder.LambdaInsertOrUpsertFunctionBinder
 import androidx.room.vo.ShortcutQueryParameter
 
 /** Provider for Guava ListenableFuture binders. */
-class GuavaListenableFutureInsertOrUpsertMethodBinderProvider(private val context: Context) :
-    InsertOrUpsertMethodBinderProvider {
+class GuavaListenableFutureInsertOrUpsertFunctionBinderProvider(private val context: Context) :
+    InsertOrUpsertFunctionBinderProvider {
 
     private val hasGuavaRoom by lazy {
         context.processingEnv.findTypeElement(GUAVA_ROOM_MARKER.canonicalName) != null
@@ -44,7 +44,7 @@
         declared: XType,
         params: List<ShortcutQueryParameter>,
         forUpsert: Boolean
-    ): InsertOrUpsertMethodBinder {
+    ): InsertOrUpsertFunctionBinder {
         if (!hasGuavaRoom) {
             context.logger.e(ProcessorErrors.MISSING_ROOM_GUAVA_ARTIFACT)
         }
@@ -54,7 +54,7 @@
             context.logger.e(ProcessorErrors.NONNULL_VOID)
         }
 
-        return LambdaInsertOrUpsertMethodBinder(
+        return LambdaInsertOrUpsertFunctionBinder(
             typeArg = typeArg,
             functionName = GUAVA_ROOM_CREATE_LISTENABLE_FUTURE,
             adapter =
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InsertOrUpsertMethodBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InsertOrUpsertFunctionBinderProvider.kt
similarity index 73%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InsertOrUpsertMethodBinderProvider.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InsertOrUpsertFunctionBinderProvider.kt
index 57e8bba..dac8c97 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InsertOrUpsertMethodBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InsertOrUpsertFunctionBinderProvider.kt
@@ -17,19 +17,21 @@
 package androidx.room.solver.shortcut.binderprovider
 
 import androidx.room.compiler.processing.XType
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
 import androidx.room.vo.ShortcutQueryParameter
 
-/** Provider for insert and upsert method binders. */
-interface InsertOrUpsertMethodBinderProvider {
+/** Provider for insert and upsert function binders. */
+interface InsertOrUpsertFunctionBinderProvider {
 
-    /** Check whether the [XType] can be handled by the [InsertOrUpsertMethodBinder] */
+    /** Check whether the [XType] can be handled by the [InsertOrUpsertFunctionBinder] */
     fun matches(declared: XType): Boolean
 
-    /** Provider of [InsertOrUpsertMethodBinder], based on the [XType] and the list of parameters */
+    /**
+     * Provider of [InsertOrUpsertFunctionBinder], based on the [XType] and the list of parameters
+     */
     fun provide(
         declared: XType,
         params: List<ShortcutQueryParameter>,
         forUpsert: Boolean
-    ): InsertOrUpsertMethodBinder
+    ): InsertOrUpsertFunctionBinder
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantDeleteOrUpdateMethodBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantDeleteOrUpdateFunctionBinderProvider.kt
similarity index 69%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantDeleteOrUpdateMethodBinderProvider.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantDeleteOrUpdateFunctionBinderProvider.kt
index 3e8ef08..8abbd94 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantDeleteOrUpdateMethodBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantDeleteOrUpdateFunctionBinderProvider.kt
@@ -18,17 +18,17 @@
 
 import androidx.room.compiler.processing.XType
 import androidx.room.processor.Context
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
-import androidx.room.solver.shortcut.binder.InstantDeleteOrUpdateMethodBinder
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
+import androidx.room.solver.shortcut.binder.InstantDeleteOrUpdateFunctionBinder
 
-/** Provider for instant (blocking) delete or update method binder */
-class InstantDeleteOrUpdateMethodBinderProvider(private val context: Context) :
-    DeleteOrUpdateMethodBinderProvider {
+/** Provider for instant (blocking) delete or update function binder */
+class InstantDeleteOrUpdateFunctionBinderProvider(private val context: Context) :
+    DeleteOrUpdateFunctionBinderProvider {
 
     override fun matches(declared: XType) = true
 
-    override fun provide(declared: XType): DeleteOrUpdateMethodBinder {
+    override fun provide(declared: XType): DeleteOrUpdateFunctionBinder {
         val adapter = context.typeAdapterStore.findDeleteOrUpdateAdapter(declared)
-        return InstantDeleteOrUpdateMethodBinder(adapter)
+        return InstantDeleteOrUpdateFunctionBinder(adapter)
     }
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantInsertOrUpsertMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantInsertOrUpsertFunctionBinder.kt
similarity index 77%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantInsertOrUpsertMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantInsertOrUpsertFunctionBinder.kt
index e902119..99fcd51 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantInsertOrUpsertMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/InstantInsertOrUpsertFunctionBinder.kt
@@ -18,13 +18,13 @@
 
 import androidx.room.compiler.processing.XType
 import androidx.room.processor.Context
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
-import androidx.room.solver.shortcut.binder.InstantInsertOrUpsertMethodBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
+import androidx.room.solver.shortcut.binder.InstantInsertOrUpsertFunctionBinder
 import androidx.room.vo.ShortcutQueryParameter
 
-/** Provider for instant (blocking) insert or upsert method binder. */
-class InstantInsertOrUpsertMethodBinderProvider(private val context: Context) :
-    InsertOrUpsertMethodBinderProvider {
+/** Provider for instant (blocking) insert or upsert function binders. */
+class InstantInsertOrUpsertFunctionBinderProvider(private val context: Context) :
+    InsertOrUpsertFunctionBinderProvider {
 
     override fun matches(declared: XType) = true
 
@@ -32,8 +32,8 @@
         declared: XType,
         params: List<ShortcutQueryParameter>,
         forUpsert: Boolean
-    ): InsertOrUpsertMethodBinder {
-        return InstantInsertOrUpsertMethodBinder(
+    ): InsertOrUpsertFunctionBinder {
+        return InstantInsertOrUpsertFunctionBinder(
             if (forUpsert) {
                 context.typeAdapterStore.findUpsertAdapter(declared, params)
             } else {
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateFunctionBinderProvider.kt
similarity index 70%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateFunctionBinderProvider.kt
index 535e608..d152405 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateFunctionBinderProvider.kt
@@ -21,13 +21,13 @@
 import androidx.room.ext.KotlinTypeNames
 import androidx.room.processor.Context
 import androidx.room.solver.RxType
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
-import androidx.room.solver.shortcut.binder.LambdaDeleteOrUpdateMethodBinder
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
+import androidx.room.solver.shortcut.binder.LambdaDeleteOrUpdateFunctionBinder
 
 /** Provider for Rx Callable binders. */
-open class RxCallableDeleteOrUpdateMethodBinderProvider
+open class RxCallableDeleteOrUpdateFunctionBinderProvider
 internal constructor(val context: Context, private val rxType: RxType) :
-    DeleteOrUpdateMethodBinderProvider {
+    DeleteOrUpdateFunctionBinderProvider {
 
     /**
      * [Single] and [Maybe] are generics but [Completable] is not so each implementation of this
@@ -42,10 +42,10 @@
         return declared.rawType.asTypeName() == rxType.className
     }
 
-    override fun provide(declared: XType): DeleteOrUpdateMethodBinder {
+    override fun provide(declared: XType): DeleteOrUpdateFunctionBinder {
         val typeArg = extractTypeArg(declared)
         val adapter = context.typeAdapterStore.findDeleteOrUpdateAdapter(typeArg)
-        return LambdaDeleteOrUpdateMethodBinder(
+        return LambdaDeleteOrUpdateFunctionBinder(
             typeArg = typeArg,
             functionName = rxType.factoryMethodName,
             adapter = adapter
@@ -55,18 +55,18 @@
     companion object {
         fun getAll(context: Context) =
             listOf(
-                RxSingleOrMaybeDeleteOrUpdateMethodBinderProvider(context, RxType.RX2_SINGLE),
-                RxSingleOrMaybeDeleteOrUpdateMethodBinderProvider(context, RxType.RX2_MAYBE),
-                RxCompletableDeleteOrUpdateMethodBinderProvider(context, RxType.RX2_COMPLETABLE),
-                RxSingleOrMaybeDeleteOrUpdateMethodBinderProvider(context, RxType.RX3_SINGLE),
-                RxSingleOrMaybeDeleteOrUpdateMethodBinderProvider(context, RxType.RX3_MAYBE),
-                RxCompletableDeleteOrUpdateMethodBinderProvider(context, RxType.RX3_COMPLETABLE)
+                RxSingleOrMaybeDeleteOrUpdateFunctionBinderProvider(context, RxType.RX2_SINGLE),
+                RxSingleOrMaybeDeleteOrUpdateFunctionBinderProvider(context, RxType.RX2_MAYBE),
+                RxCompletableDeleteOrUpdateFunctionBinderProvider(context, RxType.RX2_COMPLETABLE),
+                RxSingleOrMaybeDeleteOrUpdateFunctionBinderProvider(context, RxType.RX3_SINGLE),
+                RxSingleOrMaybeDeleteOrUpdateFunctionBinderProvider(context, RxType.RX3_MAYBE),
+                RxCompletableDeleteOrUpdateFunctionBinderProvider(context, RxType.RX3_COMPLETABLE)
             )
     }
 }
 
-private class RxCompletableDeleteOrUpdateMethodBinderProvider(context: Context, rxType: RxType) :
-    RxCallableDeleteOrUpdateMethodBinderProvider(context, rxType) {
+private class RxCompletableDeleteOrUpdateFunctionBinderProvider(context: Context, rxType: RxType) :
+    RxCallableDeleteOrUpdateFunctionBinderProvider(context, rxType) {
 
     private val completableType: XRawType? by lazy {
         context.processingEnv.findType(rxType.className.canonicalName)?.rawType
@@ -87,8 +87,10 @@
     }
 }
 
-private class RxSingleOrMaybeDeleteOrUpdateMethodBinderProvider(context: Context, rxType: RxType) :
-    RxCallableDeleteOrUpdateMethodBinderProvider(context, rxType) {
+private class RxSingleOrMaybeDeleteOrUpdateFunctionBinderProvider(
+    context: Context,
+    rxType: RxType
+) : RxCallableDeleteOrUpdateFunctionBinderProvider(context, rxType) {
 
     /** Since Maybe can have null values, the lambda returned must allow for null values. */
     override fun extractTypeArg(declared: XType): XType =
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertOrUpsertMethodBinderProvider.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertOrUpsertFunctionBinderProvider.kt
similarity index 73%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertOrUpsertMethodBinderProvider.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertOrUpsertFunctionBinderProvider.kt
index 9b0223d..ef89ede 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertOrUpsertMethodBinderProvider.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertOrUpsertFunctionBinderProvider.kt
@@ -21,14 +21,14 @@
 import androidx.room.ext.KotlinTypeNames
 import androidx.room.processor.Context
 import androidx.room.solver.RxType
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
-import androidx.room.solver.shortcut.binder.LambdaInsertOrUpsertMethodBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
+import androidx.room.solver.shortcut.binder.LambdaInsertOrUpsertFunctionBinder
 import androidx.room.vo.ShortcutQueryParameter
 
 /** Provider for Rx Callable binders. */
-open class RxCallableInsertOrUpsertMethodBinderProvider
+open class RxCallableInsertOrUpsertFunctionBinderProvider
 internal constructor(val context: Context, private val rxType: RxType) :
-    InsertOrUpsertMethodBinderProvider {
+    InsertOrUpsertFunctionBinderProvider {
 
     /**
      * [Single] and [Maybe] are generics but [Completable] is not so each implementation of this
@@ -47,7 +47,7 @@
         declared: XType,
         params: List<ShortcutQueryParameter>,
         forUpsert: Boolean
-    ): InsertOrUpsertMethodBinder {
+    ): InsertOrUpsertFunctionBinder {
         val typeArg = extractTypeArg(declared)
         val adapter =
             if (forUpsert) {
@@ -55,7 +55,7 @@
             } else {
                 context.typeAdapterStore.findInsertAdapter(typeArg, params)
             }
-        return LambdaInsertOrUpsertMethodBinder(
+        return LambdaInsertOrUpsertFunctionBinder(
             typeArg = typeArg,
             functionName = rxType.factoryMethodName,
             adapter = adapter
@@ -65,18 +65,18 @@
     companion object {
         fun getAll(context: Context) =
             listOf(
-                RxSingleOrMaybeInsertOrUpsertMethodBinderProvider(context, RxType.RX2_SINGLE),
-                RxSingleOrMaybeInsertOrUpsertMethodBinderProvider(context, RxType.RX2_MAYBE),
-                RxCompletableInsertOrUpsertMethodBinderProvider(context, RxType.RX2_COMPLETABLE),
-                RxSingleOrMaybeInsertOrUpsertMethodBinderProvider(context, RxType.RX3_SINGLE),
-                RxSingleOrMaybeInsertOrUpsertMethodBinderProvider(context, RxType.RX3_MAYBE),
-                RxCompletableInsertOrUpsertMethodBinderProvider(context, RxType.RX3_COMPLETABLE)
+                RxSingleOrMaybeInsertOrUpsertFunctionBinderProvider(context, RxType.RX2_SINGLE),
+                RxSingleOrMaybeInsertOrUpsertFunctionBinderProvider(context, RxType.RX2_MAYBE),
+                RxCompletableInsertOrUpsertFunctionBinderProvider(context, RxType.RX2_COMPLETABLE),
+                RxSingleOrMaybeInsertOrUpsertFunctionBinderProvider(context, RxType.RX3_SINGLE),
+                RxSingleOrMaybeInsertOrUpsertFunctionBinderProvider(context, RxType.RX3_MAYBE),
+                RxCompletableInsertOrUpsertFunctionBinderProvider(context, RxType.RX3_COMPLETABLE)
             )
     }
 }
 
-private class RxCompletableInsertOrUpsertMethodBinderProvider(context: Context, rxType: RxType) :
-    RxCallableInsertOrUpsertMethodBinderProvider(context, rxType) {
+private class RxCompletableInsertOrUpsertFunctionBinderProvider(context: Context, rxType: RxType) :
+    RxCallableInsertOrUpsertFunctionBinderProvider(context, rxType) {
 
     private val completableType: XRawType? by lazy {
         context.processingEnv.findType(rxType.className.canonicalName)?.rawType
@@ -97,8 +97,10 @@
     }
 }
 
-private class RxSingleOrMaybeInsertOrUpsertMethodBinderProvider(context: Context, rxType: RxType) :
-    RxCallableInsertOrUpsertMethodBinderProvider(context, rxType) {
+private class RxSingleOrMaybeInsertOrUpsertFunctionBinderProvider(
+    context: Context,
+    rxType: RxType
+) : RxCallableInsertOrUpsertFunctionBinderProvider(context, rxType) {
 
     /** Since Maybe can have null values, the lambda returned must allow for null values. */
     override fun extractTypeArg(declared: XType): XType =
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateMethodAdapter.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateFunctionAdapter.kt
similarity index 90%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateMethodAdapter.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateFunctionAdapter.kt
index 512d877..e89ebbd 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateMethodAdapter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateFunctionAdapter.kt
@@ -32,12 +32,12 @@
 import androidx.room.solver.CodeGenScope
 import androidx.room.vo.ShortcutQueryParameter
 
-/** Class that knows how to generate a delete or update method body. */
-class DeleteOrUpdateMethodAdapter private constructor(val returnType: XType) {
+/** Class that knows how to generate a delete or update function body. */
+class DeleteOrUpdateFunctionAdapter private constructor(val returnType: XType) {
     companion object {
-        fun create(returnType: XType): DeleteOrUpdateMethodAdapter? {
+        fun create(returnType: XType): DeleteOrUpdateFunctionAdapter? {
             if (isDeleteOrUpdateValid(returnType)) {
-                return DeleteOrUpdateMethodAdapter(returnType)
+                return DeleteOrUpdateFunctionAdapter(returnType)
             }
             return null
         }
@@ -50,7 +50,7 @@
         }
     }
 
-    fun generateMethodBody(
+    fun generateFunctionBody(
         scope: CodeGenScope,
         parameters: List<ShortcutQueryParameter>,
         adapters: Map<String, Pair<XPropertySpec, Any>>,
@@ -81,7 +81,7 @@
                     "%L%L.%L(%L, %L)",
                     if (resultVar == null) "" else "$resultVar += ",
                     adapter.name,
-                    param.handleMethodName,
+                    param.handleFunctionName,
                     connectionVar,
                     param.name
                 )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertFunctionAdapter.kt
similarity index 83%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertFunctionAdapter.kt
index c6b9dbd..22d0950e 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertFunctionAdapter.kt
@@ -37,20 +37,20 @@
 import androidx.room.solver.CodeGenScope
 import androidx.room.vo.ShortcutQueryParameter
 
-class InsertOrUpsertMethodAdapter private constructor(private val methodInfo: MethodInfo) {
-    internal val returnType = methodInfo.returnType
+class InsertOrUpsertFunctionAdapter private constructor(private val functionInfo: FunctionInfo) {
+    internal val returnType = functionInfo.returnType
 
     companion object {
         fun createInsert(
             context: Context,
             returnType: XType,
             params: List<ShortcutQueryParameter>
-        ): InsertOrUpsertMethodAdapter? {
-            return createMethod(
+        ): InsertOrUpsertFunctionAdapter? {
+            return createFunction(
                 context = context,
                 returnType = returnType,
                 params = params,
-                methodInfoClass = ::InsertMethodInfo,
+                functionInfoClass = ::InsertFunctionInfo,
                 multiParamSingleReturnError =
                     ProcessorErrors.INSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH,
                 singleParamMultiReturnError =
@@ -62,12 +62,12 @@
             context: Context,
             returnType: XType,
             params: List<ShortcutQueryParameter>
-        ): InsertOrUpsertMethodAdapter? {
-            return createMethod(
+        ): InsertOrUpsertFunctionAdapter? {
+            return createFunction(
                 context = context,
                 returnType = returnType,
                 params = params,
-                methodInfoClass = ::UpsertMethodInfo,
+                functionInfoClass = ::UpsertFunctionInfo,
                 multiParamSingleReturnError =
                     ProcessorErrors.UPSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH,
                 singleParamMultiReturnError =
@@ -75,27 +75,27 @@
             )
         }
 
-        private fun createMethod(
+        private fun createFunction(
             context: Context,
             returnType: XType,
             params: List<ShortcutQueryParameter>,
-            methodInfoClass: (returnInfo: ReturnInfo, returnType: XType) -> MethodInfo,
+            functionInfoClass: (returnInfo: ReturnInfo, returnType: XType) -> FunctionInfo,
             multiParamSingleReturnError: String,
             singleParamMultiReturnError: String
-        ): InsertOrUpsertMethodAdapter? {
-            val methodReturnType = getReturnType(returnType)
+        ): InsertOrUpsertFunctionAdapter? {
+            val functionReturnType = getReturnType(returnType)
             if (
-                methodReturnType != null &&
+                functionReturnType != null &&
                     isReturnValid(
                         context,
-                        methodReturnType,
+                        functionReturnType,
                         params,
                         multiParamSingleReturnError,
                         singleParamMultiReturnError
                     )
             ) {
-                val methodInfo = methodInfoClass(methodReturnType, returnType)
-                return InsertOrUpsertMethodAdapter(methodInfo = methodInfo)
+                val functionInfo = functionInfoClass(functionReturnType, returnType)
+                return InsertOrUpsertFunctionAdapter(functionInfo = functionInfo)
             }
             return null
         }
@@ -175,7 +175,7 @@
         }
     }
 
-    fun generateMethodBody(
+    fun generateFunctionBody(
         scope: CodeGenScope,
         connectionVar: String,
         parameters: List<ShortcutQueryParameter>,
@@ -198,19 +198,19 @@
                     XCodeBlock.of(
                             "%L.%L(%L, %L)",
                             upsertAdapter.name,
-                            methodInfo.methodName,
+                            functionInfo.functionName,
                             connectionVar,
                             param.name
                         )
                         .let {
                             if (
                                 scope.language == CodeLanguage.KOTLIN &&
-                                    methodInfo.returnInfo == ReturnInfo.ID_ARRAY_BOX &&
-                                    methodInfo.returnType.asTypeName() ==
-                                        methodInfo.returnInfo.typeName
+                                    functionInfo.returnInfo == ReturnInfo.ID_ARRAY_BOX &&
+                                    functionInfo.returnType.asTypeName() ==
+                                        functionInfo.returnInfo.typeName
                             ) {
                                 XCodeBlock.ofCast(
-                                    typeName = methodInfo.returnInfo.typeName,
+                                    typeName = functionInfo.returnInfo.typeName,
                                     expressionBlock = it
                                 )
                             } else {
@@ -219,7 +219,7 @@
                         }
                 when (scope.language) {
                     CodeLanguage.JAVA -> {
-                        when (methodInfo.returnInfo) {
+                        when (functionInfo.returnInfo) {
                             ReturnInfo.VOID,
                             ReturnInfo.VOID_OBJECT -> {
                                 if (param == parameters.last()) {
@@ -262,21 +262,21 @@
         }
     }
 
-    sealed class MethodInfo(val returnInfo: ReturnInfo, val returnType: XType) {
-        abstract val methodName: String
+    sealed class FunctionInfo(val returnInfo: ReturnInfo, val returnType: XType) {
+        abstract val functionName: String
     }
 
-    class InsertMethodInfo(returnInfo: ReturnInfo, returnType: XType) :
-        MethodInfo(returnInfo, returnType) {
-        override val methodName: String = "insert${returnInfo.methodSuffix}"
+    class InsertFunctionInfo(returnInfo: ReturnInfo, returnType: XType) :
+        FunctionInfo(returnInfo, returnType) {
+        override val functionName: String = "insert${returnInfo.functionSuffix}"
     }
 
-    class UpsertMethodInfo(returnInfo: ReturnInfo, returnType: XType) :
-        MethodInfo(returnInfo, returnType) {
-        override val methodName: String = "upsert${returnInfo.methodSuffix}"
+    class UpsertFunctionInfo(returnInfo: ReturnInfo, returnType: XType) :
+        FunctionInfo(returnInfo, returnType) {
+        override val functionName: String = "upsert${returnInfo.functionSuffix}"
     }
 
-    enum class ReturnInfo(val methodSuffix: String, val typeName: XTypeName) {
+    enum class ReturnInfo(val functionSuffix: String, val typeName: XTypeName) {
         VOID("", XTypeName.UNIT_VOID), // return void
         VOID_OBJECT("", CommonTypeNames.VOID), // return Void
         UNIT("", XTypeName.UNIT_VOID), // return kotlin.Unit.INSTANCE
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionFunctionBinder.kt
similarity index 94%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionFunctionBinder.kt
index f1ae556..b999825 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionFunctionBinder.kt
@@ -27,14 +27,14 @@
 import androidx.room.ext.LambdaSpec
 import androidx.room.ext.RoomMemberNames.DB_UTIL_PERFORM_IN_TRANSACTION_SUSPENDING
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.transaction.result.TransactionMethodAdapter
+import androidx.room.solver.transaction.result.TransactionFunctionAdapter
 
 /** Binder that knows how to write suspending transaction wrapper methods. */
-class CoroutineTransactionMethodBinder(
+class CoroutineTransactionFunctionBinder(
     private val returnType: XType,
-    adapter: TransactionMethodAdapter,
+    adapter: TransactionFunctionAdapter,
     private val continuationParamName: String
-) : TransactionMethodBinder(adapter) {
+) : TransactionFunctionBinder(adapter) {
     override fun executeAndReturn(
         parameterNames: List<String>,
         daoName: XClassName,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionFunctionBinder.kt
similarity index 95%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionFunctionBinder.kt
index e2e6208..ff0b66e 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionFunctionBinder.kt
@@ -30,13 +30,13 @@
 import androidx.room.ext.RoomMemberNames.DB_UTIL_PERFORM_BLOCKING
 import androidx.room.ext.SQLiteDriverTypeNames
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.transaction.result.TransactionMethodAdapter
+import androidx.room.solver.transaction.result.TransactionFunctionAdapter
 
 /** Binder that knows how to write instant (blocking) transaction wrapper methods. */
-class InstantTransactionMethodBinder(
+class InstantTransactionFunctionBinder(
     private val returnType: XType,
-    adapter: TransactionMethodAdapter,
-) : TransactionMethodBinder(adapter) {
+    adapter: TransactionFunctionAdapter,
+) : TransactionFunctionBinder(adapter) {
     override fun executeAndReturn(
         parameterNames: List<String>,
         daoName: XClassName,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionMethodBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionFunctionBinder.kt
similarity index 65%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionMethodBinder.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionFunctionBinder.kt
index 6665400..7705da5 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionMethodBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionFunctionBinder.kt
@@ -19,20 +19,20 @@
 import androidx.room.compiler.codegen.XClassName
 import androidx.room.compiler.codegen.XPropertySpec
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.transaction.result.TransactionMethodAdapter
+import androidx.room.solver.transaction.result.TransactionFunctionAdapter
 
 /**
- * Connects a transaction method, database and a [TransactionMethodAdapter].
+ * Connects a transaction function, database and a [TransactionFunctionAdapter].
  *
- * The default implementation is [InstantTransactionMethodBinder] that executes the transaction
+ * The default implementation is [InstantTransactionFunctionBinder] that executes the transaction
  * synchronously. Other deferred transactions are unsupported expect for coroutines, for such
- * binding then [CoroutineTransactionMethodBinder] is used.
+ * binding then [CoroutineTransactionFunctionBinder] is used.
  */
-abstract class TransactionMethodBinder(val adapter: TransactionMethodAdapter) {
+abstract class TransactionFunctionBinder(val adapter: TransactionFunctionAdapter) {
 
     /**
-     * Receives the method's return type, parameters along with the Dao class names to generate the
-     * transaction wrapper body that delegates to the non-abstract or default dao method.
+     * Receives the function's return type, parameters along with the Dao class names to generate
+     * the transaction wrapper body that delegates to the non-abstract or default dao function.
      */
     abstract fun executeAndReturn(
         parameterNames: List<String>,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionMethodAdapter.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionFunctionAdapter.kt
similarity index 83%
rename from room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionMethodAdapter.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionFunctionAdapter.kt
index 3811e48..8ccbca2 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionMethodAdapter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionFunctionAdapter.kt
@@ -21,16 +21,16 @@
 import androidx.room.compiler.codegen.XCodeBlock
 import androidx.room.ext.DEFAULT_IMPLS_CLASS_NAME
 import androidx.room.solver.CodeGenScope
-import androidx.room.vo.TransactionMethod
+import androidx.room.vo.TransactionFunction
 
 /**
- * Class that knows how to generate the transaction method delegate code. Callers should take care
+ * Class that knows how to generate the transaction function delegate code. Callers should take care
  * of using the invocation code in a statement or in another block (such as a lambda).
  */
-class TransactionMethodAdapter(
-    private val methodName: String,
+class TransactionFunctionAdapter(
+    private val functionName: String,
     private val jvmMethodName: String,
-    private val callType: TransactionMethod.CallType
+    private val callType: TransactionFunction.CallType
 ) {
     fun createDelegateToSuperCode(
         parameterNames: List<String>,
@@ -51,7 +51,7 @@
 
                 if (
                     scope.language == CodeLanguage.JAVA &&
-                        callType == TransactionMethod.CallType.DEFAULT_KOTLIN &&
+                        callType == TransactionFunction.CallType.DEFAULT_KOTLIN &&
                         parameterNames.isNotEmpty()
                 ) {
                     // An invoke to DefaultImpls has an extra 1st param so we need a comma if there
@@ -76,13 +76,13 @@
         daoImplName: XClassName,
     ): XCodeBlock =
         when (callType) {
-            TransactionMethod.CallType.CONCRETE -> {
+            TransactionFunction.CallType.CONCRETE -> {
                 XCodeBlock.of("%T.super.%N(", daoImplName, jvmMethodName)
             }
-            TransactionMethod.CallType.DEFAULT_JAVA8 -> {
+            TransactionFunction.CallType.DEFAULT_JAVA8 -> {
                 XCodeBlock.of("%T.super.%N(", daoName, jvmMethodName)
             }
-            TransactionMethod.CallType.DEFAULT_KOTLIN -> {
+            TransactionFunction.CallType.DEFAULT_KOTLIN -> {
                 XCodeBlock.of(
                     "%T.%N.%N(%T.this",
                     daoName,
@@ -95,5 +95,5 @@
 
     private fun CodeGenScope.getKotlinInvokeExpr(
         daoImplName: XClassName,
-    ): XCodeBlock = XCodeBlock.of("super@%T.%N(", daoImplName, methodName)
+    ): XCodeBlock = XCodeBlock.of("super@%T.%N(", daoImplName, functionName)
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
index 0f0d8b6..e24f25b 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
@@ -24,15 +24,15 @@
 data class Dao(
     val element: XTypeElement,
     val type: XType,
-    val queryMethods: List<QueryMethod>,
-    val rawQueryMethods: List<RawQueryMethod>,
-    val insertMethods: List<InsertMethod>,
-    val deleteMethods: List<DeleteMethod>,
-    val updateMethods: List<UpdateMethod>,
-    val upsertMethods: List<UpsertMethod>,
-    val transactionMethods: List<TransactionMethod>,
-    val kotlinBoxedPrimitiveMethodDelegates: List<KotlinBoxedPrimitiveMethodDelegate>,
-    val kotlinDefaultMethodDelegates: List<KotlinDefaultMethodDelegate>,
+    val queryFunctions: List<QueryFunction>,
+    val rawQueryFunctions: List<RawQueryFunction>,
+    val insertFunctions: List<InsertFunction>,
+    val deleteFunctions: List<DeleteFunction>,
+    val updateFunctions: List<UpdateFunction>,
+    val upsertFunctions: List<UpsertFunction>,
+    val transactionFunctions: List<TransactionFunction>,
+    val kotlinBoxedPrimitiveFunctionDelegates: List<KotlinBoxedPrimitiveFunctionDelegate>,
+    val kotlinDefaultFunctionDelegates: List<KotlinDefaultFunctionDelegate>,
     val constructorParamType: XTypeName?
 ) {
     // parsed dao might have a suffix if it is used in multiple databases.
@@ -46,12 +46,12 @@
 
     val typeName: XClassName by lazy { element.asClassName() }
 
-    val deleteOrUpdateShortcutMethods: List<DeleteOrUpdateShortcutMethod> by lazy {
-        deleteMethods + updateMethods
+    val mDeleteOrUpdateShortcutFunctions: List<DeleteOrUpdateShortcutFunction> by lazy {
+        deleteFunctions + updateFunctions
     }
 
-    val insertOrUpsertShortcutMethods: List<InsertOrUpsertShortcutMethod> by lazy {
-        insertMethods + upsertMethods
+    val mInsertOrUpsertShortcutFunctions: List<InsertOrUpsertShortcutFunction> by lazy {
+        insertFunctions + upsertFunctions
     }
 
     val implTypeName: XClassName by lazy {
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/DaoMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/DaoFunction.kt
similarity index 85%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/DaoMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/DaoFunction.kt
index 32fab37..a3bbbd2 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/DaoMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/DaoFunction.kt
@@ -18,7 +18,7 @@
 
 import androidx.room.compiler.processing.XMethodElement
 
-/** References a method that returns a dao in a Database */
-data class DaoMethod(val element: XMethodElement, val dao: Dao) {
+/** References a function that returns a dao in a Database */
+data class DaoFunction(val element: XMethodElement, val dao: Dao) {
     val isProperty = element.isKotlinPropertyMethod()
 }
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/DataClassMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/DataClassFunction.kt
similarity index 96%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/DataClassMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/DataClassFunction.kt
index b8d948d..153b1d1 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/DataClassMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/DataClassFunction.kt
@@ -20,7 +20,7 @@
 import androidx.room.compiler.processing.XMethodType
 
 /** An executable element processed as member of a class (data class or entity) */
-class DataClassMethod(
+class DataClassFunction(
     val element: XMethodElement,
     val resolvedType: XMethodType,
 )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/Database.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/Database.kt
index 15f95d4..02efebf 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/Database.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/Database.kt
@@ -35,7 +35,7 @@
     val type: XType,
     val entities: List<Entity>,
     val views: List<DatabaseView>,
-    val daoMethods: List<DaoMethod>,
+    val daoFunctions: List<DaoFunction>,
     val version: Int,
     val exportSchema: Boolean,
     val enableForeignKeys: Boolean,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteFunction.kt
similarity index 78%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteFunction.kt
index 7e69f5f..016e9b4 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteFunction.kt
@@ -16,11 +16,11 @@
 package androidx.room.vo
 
 import androidx.room.compiler.processing.XMethodElement
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
 
-class DeleteMethod(
+class DeleteFunction(
     element: XMethodElement,
     entities: Map<String, ShortcutEntity>,
     parameters: List<ShortcutQueryParameter>,
-    methodBinder: DeleteOrUpdateMethodBinder?
-) : DeleteOrUpdateShortcutMethod(element, entities, parameters, methodBinder)
+    functionBinder: DeleteOrUpdateFunctionBinder?
+) : DeleteOrUpdateShortcutFunction(element, entities, parameters, functionBinder)
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteOrUpdateShortcutMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteOrUpdateShortcutFunction.kt
similarity index 78%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteOrUpdateShortcutMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteOrUpdateShortcutFunction.kt
index ce477a6..4de4de6e 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteOrUpdateShortcutMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/DeleteOrUpdateShortcutFunction.kt
@@ -17,12 +17,12 @@
 package androidx.room.vo
 
 import androidx.room.compiler.processing.XMethodElement
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
 
-/** Base class for shortcut methods in @DAO. */
-abstract class DeleteOrUpdateShortcutMethod(
+/** Base class for shortcut functions in @DAO. */
+abstract class DeleteOrUpdateShortcutFunction(
     val element: XMethodElement,
     val entities: Map<String, ShortcutEntity>,
     val parameters: List<ShortcutQueryParameter>,
-    val methodBinder: DeleteOrUpdateMethodBinder?
+    val functionBinder: DeleteOrUpdateFunctionBinder?
 )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertFunction.kt
similarity index 80%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/InsertMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/InsertFunction.kt
index c97af3d..3a966ff 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertFunction.kt
@@ -19,13 +19,13 @@
 import androidx.room.OnConflictStrategy
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
 
-class InsertMethod(
+class InsertFunction(
     element: XMethodElement,
     @OnConflictStrategy val onConflict: Int,
     entities: Map<String, ShortcutEntity>,
     returnType: XType,
     parameters: List<ShortcutQueryParameter>,
-    methodBinder: InsertOrUpsertMethodBinder
-) : InsertOrUpsertShortcutMethod(element, entities, returnType, parameters, methodBinder)
+    functionBinder: InsertOrUpsertFunctionBinder
+) : InsertOrUpsertShortcutFunction(element, entities, returnType, parameters, functionBinder)
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertOrUpsertShortcutMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertOrUpsertShortcutFunction.kt
similarity index 79%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/InsertOrUpsertShortcutMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/InsertOrUpsertShortcutFunction.kt
index 2d04873..94b1b47 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertOrUpsertShortcutMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/InsertOrUpsertShortcutFunction.kt
@@ -18,13 +18,13 @@
 
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
 
-/** Base class for shortcut methods in @DAO. */
-abstract class InsertOrUpsertShortcutMethod(
+/** Base class for shortcut functions in @DAO. */
+abstract class InsertOrUpsertShortcutFunction(
     val element: XMethodElement,
     val entities: Map<String, ShortcutEntity>,
     val returnType: XType,
     val parameters: List<ShortcutQueryParameter>,
-    val methodBinder: InsertOrUpsertMethodBinder?
+    val functionBinder: InsertOrUpsertFunctionBinder?
 )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveMethodDelegate.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveFunctionDelegate.kt
similarity index 65%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveMethodDelegate.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveFunctionDelegate.kt
index 0a7ed24..4b5076d 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveMethodDelegate.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveFunctionDelegate.kt
@@ -19,11 +19,11 @@
 import androidx.room.compiler.processing.XMethodElement
 
 /**
- * Represents a DAO bridge method that to supported the boxed version of a generic abstract class or
- * interface in Kotlin. When generating the Java implementation of the DAO, Room needs to also
- * override the bridge method generated by Kotlin for the boxed version support, see KT-46650.
+ * Represents a DAO bridge function that to supported the boxed version of a generic abstract class
+ * or interface in Kotlin. When generating the Java implementation of the DAO, Room needs to also
+ * override the bridge function generated by Kotlin for the boxed version support, see KT-46650.
  */
-data class KotlinBoxedPrimitiveMethodDelegate(
+data class KotlinBoxedPrimitiveFunctionDelegate(
     val element: XMethodElement,
-    val concreteMethod: XMethodElement
+    val concreteFunction: XMethodElement
 )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultMethodDelegate.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultFunctionDelegate.kt
similarity index 86%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultMethodDelegate.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultFunctionDelegate.kt
index a6a43b4..de4ffe0 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultMethodDelegate.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultFunctionDelegate.kt
@@ -19,10 +19,10 @@
 import androidx.room.compiler.processing.XMethodElement
 
 /**
- * Represents a DAO method that delegates to a concrete implementation, specifically to override a
+ * Represents a DAO function that delegates to a concrete implementation, specifically to override a
  * Kotlin interface whose implementation is in the DefaultImpl generated class.
  */
-data class KotlinDefaultMethodDelegate(
+data class KotlinDefaultFunctionDelegate(
     // the original element, not the stub that is generated for DefaultImpls
     val element: XMethodElement
 )
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/QueryMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/QueryFunction.kt
similarity index 81%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/QueryMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/QueryFunction.kt
index 6d837c0..0ff3413 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/QueryMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/QueryFunction.kt
@@ -23,10 +23,10 @@
 import androidx.room.solver.query.result.QueryResultBinder
 
 /**
- * A class that holds information about a QueryMethod. It is self sufficient and must have all
+ * A class that holds information about a QueryFunction. It is self sufficient and must have all
  * generics etc resolved once created.
  */
-sealed class QueryMethod(
+sealed class QueryFunction(
     val element: XMethodElement,
     val query: ParsedQuery,
     val returnType: XType,
@@ -46,23 +46,23 @@
     }
 }
 
-/** A query method who's query is a SELECT statement. */
-class ReadQueryMethod(
+/** A query function who's query is a SELECT statement. */
+class ReadQueryFunction(
     element: XMethodElement,
     query: ParsedQuery,
     returnType: XType,
     parameters: List<QueryParameter>,
     val inTransaction: Boolean,
     val queryResultBinder: QueryResultBinder
-) : QueryMethod(element, query, returnType, parameters) {
+) : QueryFunction(element, query, returnType, parameters) {
     val isProperty = element.isKotlinPropertyMethod()
 }
 
-/** A query method who's query is a INSERT, UPDATE or DELETE statement. */
-class WriteQueryMethod(
+/** A query function who's query is a INSERT, UPDATE or DELETE statement. */
+class WriteQueryFunction(
     element: XMethodElement,
     query: ParsedQuery,
     returnType: XType,
     parameters: List<QueryParameter>,
     val preparedQueryResultBinder: PreparedQueryResultBinder
-) : QueryMethod(element, query, returnType, parameters)
+) : QueryFunction(element, query, returnType, parameters)
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryFunction.kt
similarity index 89%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryFunction.kt
index c447dd3..c359a85 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryFunction.kt
@@ -27,10 +27,10 @@
 import androidx.room.solver.query.result.QueryResultBinder
 
 /**
- * A class that holds information about a method annotated with RawQuery. It is self sufficient and
- * must have all generics etc resolved once created.
+ * A class that holds information about a function annotated with RawQuery. It is self sufficient
+ * and must have all generics etc resolved once created.
  */
-data class RawQueryMethod(
+data class RawQueryFunction(
     val element: XMethodElement,
     val returnType: XType,
     val inTransaction: Boolean,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/ShortcutQueryParameter.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/ShortcutQueryParameter.kt
index 90196b8..425eb69 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/ShortcutQueryParameter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/ShortcutQueryParameter.kt
@@ -20,7 +20,7 @@
 import androidx.room.compiler.processing.XType
 import androidx.room.compiler.processing.XVariableElement
 
-/** Parameters used in DAO methods that are annotated with Insert, Delete, Update, and Upsert. */
+/** Parameters used in DAO functions that are annotated with Insert, Delete, Update, and Upsert. */
 data class ShortcutQueryParameter(
     val element: XVariableElement,
     val name: String,
@@ -28,8 +28,8 @@
     val pojoType: XType?, // extracted type, never a Collection
     val isMultiple: Boolean
 ) {
-    /** Method name in entity insertion or update adapter. */
-    val handleMethodName =
+    /** Function name in entity insertion or update adapter. */
+    val handleFunctionName =
         if (isMultiple) {
             "handleMultiple"
         } else {
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/TransactionMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/TransactionFunction.kt
similarity index 83%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/TransactionMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/TransactionFunction.kt
index a63abbc..6edaef4 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/TransactionMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/TransactionFunction.kt
@@ -18,17 +18,17 @@
 
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.solver.transaction.binder.TransactionMethodBinder
+import androidx.room.solver.transaction.binder.TransactionFunctionBinder
 
-class TransactionMethod(
+class TransactionFunction(
     val element: XMethodElement,
     val returnType: XType,
     val parameterNames: List<String>,
     val callType: CallType,
-    val methodBinder: TransactionMethodBinder
+    val functionBinder: TransactionFunctionBinder
 ) {
     enum class CallType {
-        /** Directly call the method, it has a super implementation */
+        /** Directly call the function, it has a super implementation */
         CONCRETE,
 
         /**
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateFunction.kt
similarity index 79%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateFunction.kt
index bbcc6fa..fbf3eaa 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateFunction.kt
@@ -18,12 +18,12 @@
 
 import androidx.room.OnConflictStrategy
 import androidx.room.compiler.processing.XMethodElement
-import androidx.room.solver.shortcut.binder.DeleteOrUpdateMethodBinder
+import androidx.room.solver.shortcut.binder.DeleteOrUpdateFunctionBinder
 
-class UpdateMethod(
+class UpdateFunction(
     element: XMethodElement,
     entities: Map<String, ShortcutEntity>,
     parameters: List<ShortcutQueryParameter>,
-    methodBinder: DeleteOrUpdateMethodBinder?,
+    functionBinder: DeleteOrUpdateFunctionBinder?,
     @OnConflictStrategy val onConflictStrategy: Int
-) : DeleteOrUpdateShortcutMethod(element, entities, parameters, methodBinder)
+) : DeleteOrUpdateShortcutFunction(element, entities, parameters, functionBinder)
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/UpsertMethod.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/UpsertFunction.kt
similarity index 78%
rename from room/room-compiler/src/main/kotlin/androidx/room/vo/UpsertMethod.kt
rename to room/room-compiler/src/main/kotlin/androidx/room/vo/UpsertFunction.kt
index 161aa46..5ebb039 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/UpsertMethod.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/UpsertFunction.kt
@@ -18,12 +18,12 @@
 
 import androidx.room.compiler.processing.XMethodElement
 import androidx.room.compiler.processing.XType
-import androidx.room.solver.shortcut.binder.InsertOrUpsertMethodBinder
+import androidx.room.solver.shortcut.binder.InsertOrUpsertFunctionBinder
 
-class UpsertMethod(
+class UpsertFunction(
     element: XMethodElement,
     entities: Map<String, ShortcutEntity>,
     returnType: XType,
     parameters: List<ShortcutQueryParameter>,
-    methodBinder: InsertOrUpsertMethodBinder
-) : InsertOrUpsertShortcutMethod(element, entities, returnType, parameters, methodBinder)
+    functionBinder: InsertOrUpsertFunctionBinder
+) : InsertOrUpsertShortcutFunction(element, entities, returnType, parameters, functionBinder)
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/vo/Warning.kt b/room/room-compiler/src/main/kotlin/androidx/room/vo/Warning.kt
index 181bf5b..cdfbbc8 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/vo/Warning.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/vo/Warning.kt
@@ -48,7 +48,7 @@
     // expand projection is removed.
     EXPAND_PROJECTION_WITH_REMOVE_UNUSED_COLUMNS("ROOM_EXPAND_PROJECTION_WITH_UNUSED_COLUMNS"),
     // We shouldn't let devs suppress this error via Room so there is no runtime constant for it
-    JVM_NAME_ON_OVERRIDDEN_METHOD("ROOM_JVM_NAME_IN_OVERRIDDEN_METHOD"),
+    JVM_NAME_ON_OVERRIDDEN_FUNCTION("ROOM_JVM_NAME_IN_OVERRIDDEN_FUNCTION"),
     AMBIGUOUS_COLUMN_IN_RESULT("ROOM_AMBIGUOUS_COLUMN_IN_RESULT"),
     UNNECESSARY_NULLABILITY_IN_DAO_RETURN_TYPE("ROOM_UNNECESSARY_NULLABILITY_IN_DAO_RETURN_TYPE");
 
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt b/room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
index 4f73947..5130e72 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
@@ -45,21 +45,21 @@
 import androidx.room.ext.capitalize
 import androidx.room.processor.OnConflictProcessor
 import androidx.room.solver.CodeGenScope
-import androidx.room.solver.KotlinBoxedPrimitiveMethodDelegateBinder
-import androidx.room.solver.KotlinDefaultMethodDelegateBinder
+import androidx.room.solver.KotlinBoxedPrimitiveFunctionDelegateBinder
+import androidx.room.solver.KotlinDefaultFunctionDelegateBinder
 import androidx.room.solver.types.getRequiredTypeConverters
 import androidx.room.vo.Dao
-import androidx.room.vo.DeleteOrUpdateShortcutMethod
-import androidx.room.vo.InsertMethod
-import androidx.room.vo.KotlinBoxedPrimitiveMethodDelegate
-import androidx.room.vo.KotlinDefaultMethodDelegate
-import androidx.room.vo.RawQueryMethod
-import androidx.room.vo.ReadQueryMethod
+import androidx.room.vo.DeleteOrUpdateShortcutFunction
+import androidx.room.vo.InsertFunction
+import androidx.room.vo.KotlinBoxedPrimitiveFunctionDelegate
+import androidx.room.vo.KotlinDefaultFunctionDelegate
+import androidx.room.vo.RawQueryFunction
+import androidx.room.vo.ReadQueryFunction
 import androidx.room.vo.ShortcutEntity
-import androidx.room.vo.TransactionMethod
-import androidx.room.vo.UpdateMethod
-import androidx.room.vo.UpsertMethod
-import androidx.room.vo.WriteQueryMethod
+import androidx.room.vo.TransactionFunction
+import androidx.room.vo.UpdateFunction
+import androidx.room.vo.UpsertFunction
+import androidx.room.vo.WriteQueryFunction
 import com.squareup.kotlinpoet.FunSpec
 import com.squareup.kotlinpoet.KModifier
 import com.squareup.kotlinpoet.jvm.jvmName
@@ -82,7 +82,7 @@
     private val companionTypeBuilder = lazy { XTypeSpec.companionObjectBuilder() }
 
     companion object {
-        const val GET_LIST_OF_TYPE_CONVERTERS_METHOD = "getRequiredConverters"
+        const val GET_LIST_OF_TYPE_CONVERTERS_FUNCTION = "getRequiredConverters"
 
         const val DB_PROPERTY_NAME = "__db"
 
@@ -103,14 +103,14 @@
     override fun createTypeSpecBuilder(): XTypeSpec.Builder {
         val builder = XTypeSpec.classBuilder(className)
 
-        val preparedQueries = dao.queryMethods.filterIsInstance<WriteQueryMethod>()
+        val preparedQueries = dao.queryFunctions.filterIsInstance<WriteQueryFunction>()
 
-        val shortcutMethods = buildList {
-            addAll(createInsertMethods())
-            addAll(createDeleteMethods())
-            addAll(createUpdateMethods())
-            addAll(createTransactionMethods())
-            addAll(createUpsertMethods())
+        val shortcutFunctions = buildList {
+            addAll(createInsertFunctions())
+            addAll(createDeleteFunctions())
+            addAll(createUpdateFunctions())
+            addAll(createTransactionFunctions())
+            addAll(createUpsertFunctions())
         }
 
         builder.apply {
@@ -130,20 +130,20 @@
             addProperty(dbProperty)
 
             setPrimaryConstructor(
-                createConstructor(shortcutMethods, dao.constructorParamType != null)
+                createConstructor(shortcutFunctions, dao.constructorParamType != null)
             )
 
-            shortcutMethods.forEach { addFunction(it.functionImpl) }
-            dao.queryMethods.filterIsInstance<ReadQueryMethod>().forEach { method ->
-                addFunction(createSelectMethod(method))
-                if (method.isProperty) {
+            shortcutFunctions.forEach { addFunction(it.functionImpl) }
+            dao.queryFunctions.filterIsInstance<ReadQueryFunction>().forEach { function ->
+                addFunction(createSelectFunction(function))
+                if (function.isProperty) {
                     // DAO function is a getter from a Kotlin property, generate property override.
                     applyToKotlinPoet {
                         addProperty(
-                            PropertySpecHelper.overriding(method.element, declaredDao)
+                            PropertySpecHelper.overriding(function.element, declaredDao)
                                 .getter(
                                     FunSpec.getterBuilder()
-                                        .addCode("return %L()", method.element.name)
+                                        .addCode("return %L()", function.element.name)
                                         .build()
                                 )
                                 .build()
@@ -151,20 +151,20 @@
                     }
                 }
             }
-            preparedQueries.forEach { addFunction(createPreparedQueryMethod(it)) }
-            dao.rawQueryMethods.forEach { addFunction(createRawQueryMethod(it)) }
+            preparedQueries.forEach { addFunction(createPreparedQueryFunction(it)) }
+            dao.rawQueryFunctions.forEach { addFunction(createRawQueryFunction(it)) }
             applyTo(CodeLanguage.JAVA) {
-                dao.kotlinDefaultMethodDelegates.forEach {
-                    addFunction(createDefaultImplMethodDelegate(it))
+                dao.kotlinDefaultFunctionDelegates.forEach {
+                    addFunction(createDefaultImplFunctionDelegate(it))
                 }
-                dao.kotlinBoxedPrimitiveMethodDelegates.forEach {
-                    addFunction(createBoxedPrimitiveBridgeMethodDelegate(it))
+                dao.kotlinBoxedPrimitiveFunctionDelegates.forEach {
+                    addFunction(createBoxedPrimitiveBridgeFunctionDelegate(it))
                 }
             }
             // Keep this the last one to be generated because used custom converters will
             // register fields with a payload which we collect in dao to report used
             // Type Converters.
-            addConverterListMethod(this)
+            addConverterListFunction(this)
             applyTo(CodeLanguage.KOTLIN) {
                 if (companionTypeBuilder.isInitialized()) {
                     addType(companionTypeBuilder.value.build())
@@ -174,16 +174,16 @@
         return builder
     }
 
-    private fun addConverterListMethod(typeSpecBuilder: XTypeSpec.Builder) {
+    private fun addConverterListFunction(typeSpecBuilder: XTypeSpec.Builder) {
         // For Java a static method is created
-        typeSpecBuilder.applyTo(CodeLanguage.JAVA) { addFunction(createConverterListMethod()) }
+        typeSpecBuilder.applyTo(CodeLanguage.JAVA) { addFunction(createConverterListFunction()) }
         // For Kotlin a function in the companion object is created
         companionTypeBuilder.value.applyTo(CodeLanguage.KOTLIN) {
-            addFunction(createConverterListMethod())
+            addFunction(createConverterListFunction())
         }
     }
 
-    private fun createConverterListMethod(): XFunSpec {
+    private fun createConverterListFunction(): XFunSpec {
         val body = buildCodeBlock { language ->
             val requiredTypeConverters = getRequiredTypeConverters()
             if (requiredTypeConverters.isEmpty()) {
@@ -218,7 +218,7 @@
                 }
             }
         }
-        return XFunSpec.builder(GET_LIST_OF_TYPE_CONVERTERS_METHOD, VisibilityModifier.PUBLIC)
+        return XFunSpec.builder(GET_LIST_OF_TYPE_CONVERTERS_FUNCTION, VisibilityModifier.PUBLIC)
             .applyToJavaPoet { addModifiers(javax.lang.model.element.Modifier.STATIC) }
             .applyTo { language ->
                 returns(
@@ -234,33 +234,33 @@
             .build()
     }
 
-    private fun createTransactionMethods(): List<PreparedStmtQuery> {
-        return dao.transactionMethods.map {
-            PreparedStmtQuery(emptyMap(), createTransactionMethodBody(it))
+    private fun createTransactionFunctions(): List<PreparedStmtQuery> {
+        return dao.transactionFunctions.map {
+            PreparedStmtQuery(emptyMap(), createTransactionFunctionBody(it))
         }
     }
 
-    private fun createTransactionMethodBody(method: TransactionMethod): XFunSpec {
+    private fun createTransactionFunctionBody(function: TransactionFunction): XFunSpec {
         val scope = CodeGenScope(this)
-        method.methodBinder.executeAndReturn(
-            parameterNames = method.parameterNames,
+        function.functionBinder.executeAndReturn(
+            parameterNames = function.parameterNames,
             daoName = dao.typeName,
             daoImplName = dao.implTypeName,
             dbProperty = dbProperty,
             scope = scope
         )
-        return overrideWithoutAnnotations(method.element, declaredDao)
+        return overrideWithoutAnnotations(function.element, declaredDao)
             .addCode(scope.generate())
             .build()
     }
 
     private fun createConstructor(
-        shortcutMethods: List<PreparedStmtQuery>,
+        shortcutFunctions: List<PreparedStmtQuery>,
         callSuper: Boolean
     ): XFunSpec {
         val body = buildCodeBlock {
             addStatement("this.%N = %L", dbProperty, dbProperty.name)
-            shortcutMethods
+            shortcutFunctions
                 .asSequence()
                 .filterNot { it.fields.isEmpty() }
                 .map { it.fields.values }
@@ -282,11 +282,11 @@
             .build()
     }
 
-    private fun createSelectMethod(method: ReadQueryMethod): XFunSpec {
-        return overrideWithoutAnnotations(method.element, declaredDao)
+    private fun createSelectFunction(function: ReadQueryFunction): XFunSpec {
+        return overrideWithoutAnnotations(function.element, declaredDao)
             .applyToKotlinPoet {
                 // TODO: Update XPoet to better handle this case.
-                if (method.isProperty) {
+                if (function.isProperty) {
                     // When the DAO function is from a Kotlin property, we'll still generate
                     // a DAO function, but it won't be an override and it'll be private, to be
                     // called from the overridden property's getter.
@@ -302,34 +302,34 @@
                         context.targetPlatforms.size == 1 &&
                             context.targetPlatforms.contains(XProcessingEnv.Platform.JVM)
                     ) {
-                        jvmName("_private${method.element.name.capitalize(Locale.US)}")
+                        jvmName("_private${function.element.name.capitalize(Locale.US)}")
                     }
                 }
             }
-            .addCode(createQueryMethodBody(method))
+            .addCode(createQueryFunctionBody(function))
             .build()
     }
 
-    private fun createRawQueryMethod(method: RawQueryMethod): XFunSpec {
-        return overrideWithoutAnnotations(method.element, declaredDao)
+    private fun createRawQueryFunction(function: RawQueryFunction): XFunSpec {
+        return overrideWithoutAnnotations(function.element, declaredDao)
             .addCode(
                 if (
-                    method.runtimeQueryParam == null ||
-                        method.queryResultBinder.usesCompatQueryWriter
+                    function.runtimeQueryParam == null ||
+                        function.queryResultBinder.usesCompatQueryWriter
                 ) {
-                    compatCreateRawQueryMethodBody(method)
+                    compatCreateRawQueryFunctionBody(function)
                 } else {
-                    createRawQueryMethodBody(method)
+                    createRawQueryFunctionBody(function)
                 }
             )
             .build()
     }
 
-    private fun createRawQueryMethodBody(method: RawQueryMethod): XCodeBlock {
+    private fun createRawQueryFunctionBody(function: RawQueryFunction): XCodeBlock {
         val scope = CodeGenScope(this@DaoWriter)
         val sqlQueryVar = scope.getTmpVar("_sql")
         val rawQueryParamName =
-            if (method.runtimeQueryParam!!.isSupportQuery()) {
+            if (function.runtimeQueryParam!!.isSupportQuery()) {
                 val rawQueryVar = scope.getTmpVar("_rawQuery")
                 scope.builder.addLocalVariable(
                     name = rawQueryVar,
@@ -338,12 +338,12 @@
                         XCodeBlock.of(
                             format = "%T.copyFrom(%L).toRoomRawQuery()",
                             ROOM_SQL_QUERY,
-                            method.runtimeQueryParam.paramName
+                            function.runtimeQueryParam.paramName
                         )
                 )
                 rawQueryVar
             } else {
-                method.runtimeQueryParam.paramName
+                function.runtimeQueryParam.paramName
             }
 
         scope.builder.addLocalVal(
@@ -354,8 +354,8 @@
             XCodeBlock.ofString(java = "getSql()", kotlin = "sql")
         )
 
-        if (method.returnsValue) {
-            method.queryResultBinder.convertAndReturn(
+        if (function.returnsValue) {
+            function.queryResultBinder.convertAndReturn(
                 sqlQueryVar = sqlQueryVar,
                 dbProperty = dbProperty,
                 bindStatement = { stmtVar ->
@@ -365,8 +365,8 @@
                         stmtVar
                     )
                 },
-                returnTypeName = method.returnType.asTypeName(),
-                inTransaction = method.inTransaction,
+                returnTypeName = function.returnType.asTypeName(),
+                inTransaction = function.inTransaction,
                 scope = scope
             )
         }
@@ -374,12 +374,12 @@
     }
 
     /** Used by the Non-KMP Paging3 binders and the Paging2 binders. */
-    private fun compatCreateRawQueryMethodBody(method: RawQueryMethod): XCodeBlock =
+    private fun compatCreateRawQueryFunctionBody(function: RawQueryFunction): XCodeBlock =
         XCodeBlock.builder()
             .apply {
                 val scope = CodeGenScope(this@DaoWriter)
                 val roomSQLiteQueryVar: String
-                val queryParam = method.runtimeQueryParam
+                val queryParam = function.runtimeQueryParam
                 if (queryParam?.isSupportQuery() == true) {
                     queryParam.paramName
                 } else if (queryParam?.isString() == true) {
@@ -408,10 +408,10 @@
                             ),
                     )
                 }
-                val rawQueryParamName = method.runtimeQueryParam?.paramName
+                val rawQueryParamName = function.runtimeQueryParam?.paramName
                 if (rawQueryParamName != null) {
-                    if (method.returnsValue) {
-                        method.queryResultBinder.convertAndReturn(
+                    if (function.returnsValue) {
+                        function.queryResultBinder.convertAndReturn(
                             sqlQueryVar = rawQueryParamName,
                             dbProperty = dbProperty,
                             bindStatement = { stmtVar ->
@@ -421,8 +421,8 @@
                                     stmtVar
                                 )
                             },
-                            returnTypeName = method.returnType.asTypeName(),
-                            inTransaction = method.inTransaction,
+                            returnTypeName = function.returnType.asTypeName(),
+                            inTransaction = function.inTransaction,
                             scope = scope
                         )
                     }
@@ -431,48 +431,48 @@
             }
             .build()
 
-    private fun createPreparedQueryMethod(method: WriteQueryMethod): XFunSpec {
-        return overrideWithoutAnnotations(method.element, declaredDao)
-            .addCode(createPreparedQueryMethodBody(method))
+    private fun createPreparedQueryFunction(function: WriteQueryFunction): XFunSpec {
+        return overrideWithoutAnnotations(function.element, declaredDao)
+            .addCode(createPreparedQueryFunctionBody(function))
             .build()
     }
 
     /**
-     * Groups all insert methods based on the insert statement they will use then creates all field
-     * specs, EntityInsertAdapterWriter and actual insert methods.
+     * Groups all insert functions based on the insert statement they will use then creates all
+     * field specs, EntityInsertAdapterWriter and actual insert functions.
      */
-    private fun createInsertMethods(): List<PreparedStmtQuery> {
-        return dao.insertMethods.map { insertMethod ->
-            val onConflict = OnConflictProcessor.onConflictText(insertMethod.onConflict)
-            val entities = insertMethod.entities
+    private fun createInsertFunctions(): List<PreparedStmtQuery> {
+        return dao.insertFunctions.map { insertFunction ->
+            val onConflict = OnConflictProcessor.onConflictText(insertFunction.onConflict)
+            val entities = insertFunction.entities
 
             val fields =
                 entities.mapValues {
-                    val spec = getOrCreateProperty(InsertMethodProperty(it.value, onConflict))
+                    val spec = getOrCreateProperty(InsertFunctionProperty(it.value, onConflict))
                     val impl =
                         EntityInsertAdapterWriter.create(it.value, onConflict)
                             .createAnonymous(this@DaoWriter)
                     spec to impl
                 }
-            val methodImpl =
-                overrideWithoutAnnotations(insertMethod.element, declaredDao)
-                    .apply { addCode(createInsertMethodBody(insertMethod, fields)) }
+            val functionImpl =
+                overrideWithoutAnnotations(insertFunction.element, declaredDao)
+                    .apply { addCode(createInsertFunctionBody(insertFunction, fields)) }
                     .build()
-            PreparedStmtQuery(fields, methodImpl)
+            PreparedStmtQuery(fields, functionImpl)
         }
     }
 
-    private fun createInsertMethodBody(
-        method: InsertMethod,
+    private fun createInsertFunctionBody(
+        function: InsertFunction,
         insertAdapters: Map<String, Pair<XPropertySpec, XTypeSpec>>
     ): XCodeBlock {
-        if (insertAdapters.isEmpty() || method.methodBinder == null) {
+        if (insertAdapters.isEmpty() || function.functionBinder == null) {
             return XCodeBlock.builder().build()
         }
         val scope = CodeGenScope(writer = this)
-        ShortcutQueryParameterWriter.addNullCheckValidation(scope, method.parameters)
-        method.methodBinder.convertAndReturn(
-            parameters = method.parameters,
+        ShortcutQueryParameterWriter.addNullCheckValidation(scope, function.parameters)
+        function.functionBinder.convertAndReturn(
+            parameters = function.parameters,
             adapters = insertAdapters,
             dbProperty = dbProperty,
             scope = scope
@@ -480,34 +480,34 @@
         return scope.generate()
     }
 
-    /** Creates EntityUpdateAdapter for each delete method. */
-    private fun createDeleteMethods(): List<PreparedStmtQuery> {
-        return createShortcutMethods(dao.deleteMethods, "delete") { _, entity ->
+    /** Creates EntityUpdateAdapter for each delete function. */
+    private fun createDeleteFunctions(): List<PreparedStmtQuery> {
+        return createShortcutFunctions(dao.deleteFunctions, "delete") { _, entity ->
             EntityDeleteAdapterWriter.create(entity).createAnonymous(this@DaoWriter)
         }
     }
 
-    /** Creates EntityUpdateAdapter for each @Update method. */
-    private fun createUpdateMethods(): List<PreparedStmtQuery> {
-        return createShortcutMethods(dao.updateMethods, "update") { update, entity ->
+    /** Creates EntityUpdateAdapter for each @Update function. */
+    private fun createUpdateFunctions(): List<PreparedStmtQuery> {
+        return createShortcutFunctions(dao.updateFunctions, "update") { update, entity ->
             val onConflict = OnConflictProcessor.onConflictText(update.onConflictStrategy)
             EntityUpdateAdapterWriter.create(entity, onConflict).createAnonymous(this@DaoWriter)
         }
     }
 
-    private fun <T : DeleteOrUpdateShortcutMethod> createShortcutMethods(
-        methods: List<T>,
-        methodPrefix: String,
+    private fun <T : DeleteOrUpdateShortcutFunction> createShortcutFunctions(
+        functions: List<T>,
+        functionPrefix: String,
         implCallback: (T, ShortcutEntity) -> XTypeSpec
     ): List<PreparedStmtQuery> {
-        return methods.mapNotNull { method ->
-            val entities = method.entities
+        return functions.mapNotNull { function ->
+            val entities = function.entities
             if (entities.isEmpty()) {
                 null
             } else {
                 val onConflict =
-                    if (method is UpdateMethod) {
-                        OnConflictProcessor.onConflictText(method.onConflictStrategy)
+                    if (function is UpdateFunction) {
+                        OnConflictProcessor.onConflictText(function.onConflictStrategy)
                     } else {
                         ""
                     }
@@ -515,31 +515,31 @@
                     entities.mapValues {
                         val spec =
                             getOrCreateProperty(
-                                DeleteOrUpdateAdapterProperty(it.value, methodPrefix, onConflict)
+                                DeleteOrUpdateAdapterProperty(it.value, functionPrefix, onConflict)
                             )
-                        val impl = implCallback(method, it.value)
+                        val impl = implCallback(function, it.value)
                         spec to impl
                     }
-                val methodSpec =
-                    overrideWithoutAnnotations(method.element, declaredDao)
-                        .apply { addCode(createDeleteOrUpdateMethodBody(method, fields)) }
+                val functionSpec =
+                    overrideWithoutAnnotations(function.element, declaredDao)
+                        .apply { addCode(createDeleteOrUpdateFunctionBody(function, fields)) }
                         .build()
-                PreparedStmtQuery(fields, methodSpec)
+                PreparedStmtQuery(fields, functionSpec)
             }
         }
     }
 
-    private fun createDeleteOrUpdateMethodBody(
-        method: DeleteOrUpdateShortcutMethod,
+    private fun createDeleteOrUpdateFunctionBody(
+        function: DeleteOrUpdateShortcutFunction,
         adapters: Map<String, Pair<XPropertySpec, XTypeSpec>>
     ): XCodeBlock {
-        if (adapters.isEmpty() || method.methodBinder == null) {
+        if (adapters.isEmpty() || function.functionBinder == null) {
             return XCodeBlock.builder().build()
         }
         val scope = CodeGenScope(writer = this)
-        ShortcutQueryParameterWriter.addNullCheckValidation(scope, method.parameters)
-        method.methodBinder.convertAndReturn(
-            parameters = method.parameters,
+        ShortcutQueryParameterWriter.addNullCheckValidation(scope, function.parameters)
+        function.functionBinder.convertAndReturn(
+            parameters = function.parameters,
             adapters = adapters,
             dbProperty = dbProperty,
             scope = scope
@@ -548,12 +548,12 @@
     }
 
     /**
-     * Groups all upsert methods based on the upsert statement they will use then creates all field
-     * specs, EntityUpsertAdapterWriter and actual upsert methods.
+     * Groups all upsert functions based on the upsert statement they will use then creates all
+     * field specs, EntityUpsertAdapterWriter and actual upsert functions.
      */
-    private fun createUpsertMethods(): List<PreparedStmtQuery> {
-        return dao.upsertMethods.map { upsertMethod ->
-            val entities = upsertMethod.entities
+    private fun createUpsertFunctions(): List<PreparedStmtQuery> {
+        return dao.upsertFunctions.map { upsertFunctions ->
+            val entities = upsertFunctions.entities
             val fields =
                 entities.mapValues {
                     val spec = getOrCreateProperty(UpsertAdapterProperty(it.value))
@@ -562,25 +562,25 @@
                             .createConcrete(it.value, this@DaoWriter)
                     spec to impl
                 }
-            val methodImpl =
-                overrideWithoutAnnotations(upsertMethod.element, declaredDao)
-                    .apply { addCode(createUpsertMethodBody(upsertMethod, fields)) }
+            val functionImpl =
+                overrideWithoutAnnotations(upsertFunctions.element, declaredDao)
+                    .apply { addCode(createUpsertFunctionBody(upsertFunctions, fields)) }
                     .build()
-            PreparedStmtQuery(fields, methodImpl)
+            PreparedStmtQuery(fields, functionImpl)
         }
     }
 
-    private fun createUpsertMethodBody(
-        method: UpsertMethod,
+    private fun createUpsertFunctionBody(
+        function: UpsertFunction,
         upsertAdapters: Map<String, Pair<XPropertySpec, XCodeBlock>>
     ): XCodeBlock {
-        if (upsertAdapters.isEmpty() || method.methodBinder == null) {
+        if (upsertAdapters.isEmpty() || function.functionBinder == null) {
             return XCodeBlock.builder().build()
         }
         val scope = CodeGenScope(writer = this)
-        ShortcutQueryParameterWriter.addNullCheckValidation(scope, method.parameters)
-        method.methodBinder.convertAndReturn(
-            parameters = method.parameters,
+        ShortcutQueryParameterWriter.addNullCheckValidation(scope, function.parameters)
+        function.functionBinder.convertAndReturn(
+            parameters = function.parameters,
             adapters = upsertAdapters,
             dbProperty = dbProperty,
             scope = scope
@@ -588,28 +588,28 @@
         return scope.generate()
     }
 
-    private fun createPreparedQueryMethodBody(method: WriteQueryMethod): XCodeBlock {
+    private fun createPreparedQueryFunctionBody(function: WriteQueryFunction): XCodeBlock {
         val scope = CodeGenScope(this)
-        val queryWriter = QueryWriter(method)
+        val queryWriter = QueryWriter(function)
         val sqlVar = scope.getTmpVar("_sql")
         val listSizeArgs = queryWriter.prepareQuery(sqlVar, scope)
-        method.preparedQueryResultBinder.executeAndReturn(
+        function.preparedQueryResultBinder.executeAndReturn(
             sqlQueryVar = sqlVar,
             dbProperty = dbProperty,
             bindStatement = { stmtVar -> queryWriter.bindArgs(stmtVar, listSizeArgs, this) },
-            returnTypeName = method.returnType.asTypeName(),
+            returnTypeName = function.returnType.asTypeName(),
             scope = scope
         )
         return scope.generate()
     }
 
-    private fun createQueryMethodBody(method: ReadQueryMethod): XCodeBlock {
+    private fun createQueryFunctionBody(function: ReadQueryFunction): XCodeBlock {
         val scope = CodeGenScope(this)
-        val queryWriter = QueryWriter(method)
+        val queryWriter = QueryWriter(function)
         val sqlStringVar = scope.getTmpVar("_sql")
 
         val (sqlVar, listSizeArgs) =
-            if (method.queryResultBinder.usesCompatQueryWriter) {
+            if (function.queryResultBinder.usesCompatQueryWriter) {
                 val roomSQLiteQueryVar = scope.getTmpVar("_statement")
                 queryWriter.prepareReadAndBind(sqlStringVar, roomSQLiteQueryVar, scope)
                 roomSQLiteQueryVar to emptyList()
@@ -624,12 +624,12 @@
                 null
             }
 
-        method.queryResultBinder.convertAndReturn(
+        function.queryResultBinder.convertAndReturn(
             sqlQueryVar = sqlVar,
             dbProperty = dbProperty,
             bindStatement = bindStatement,
-            returnTypeName = method.returnType.asTypeName(),
-            inTransaction = method.inTransaction,
+            returnTypeName = function.returnType.asTypeName(),
+            inTransaction = function.inTransaction,
             scope = scope
         )
 
@@ -637,16 +637,18 @@
     }
 
     // TODO(b/251459654): Handle @JvmOverloads in delegating functions with Kotlin codegen.
-    private fun createDefaultImplMethodDelegate(method: KotlinDefaultMethodDelegate): XFunSpec {
+    private fun createDefaultImplFunctionDelegate(
+        function: KotlinDefaultFunctionDelegate
+    ): XFunSpec {
         val scope = CodeGenScope(this)
-        return overrideWithoutAnnotations(method.element, declaredDao)
+        return overrideWithoutAnnotations(function.element, declaredDao)
             .apply {
-                KotlinDefaultMethodDelegateBinder.executeAndReturn(
+                KotlinDefaultFunctionDelegateBinder.executeAndReturn(
                     daoName = dao.typeName,
                     daoImplName = dao.implTypeName,
-                    methodName = method.element.jvmName,
-                    returnType = method.element.returnType,
-                    parameterNames = method.element.parameters.map { it.name },
+                    functionName = function.element.jvmName,
+                    returnType = function.element.returnType,
+                    parameterNames = function.element.parameters.map { it.name },
                     scope = scope
                 )
                 addCode(scope.generate())
@@ -654,17 +656,19 @@
             .build()
     }
 
-    private fun createBoxedPrimitiveBridgeMethodDelegate(
-        method: KotlinBoxedPrimitiveMethodDelegate
+    private fun createBoxedPrimitiveBridgeFunctionDelegate(
+        function: KotlinBoxedPrimitiveFunctionDelegate
     ): XFunSpec {
         val scope = CodeGenScope(this)
-        return overrideWithoutAnnotations(method.element, declaredDao)
+        return overrideWithoutAnnotations(function.element, declaredDao)
             .apply {
-                KotlinBoxedPrimitiveMethodDelegateBinder.execute(
-                    methodName = method.element.jvmName,
-                    returnType = method.element.returnType,
+                KotlinBoxedPrimitiveFunctionDelegateBinder.execute(
+                    functionName = function.element.jvmName,
+                    returnType = function.element.returnType,
                     parameters =
-                        method.concreteMethod.parameters.map { it.type.asTypeName() to it.name },
+                        function.concreteFunction.parameters.map {
+                            it.type.asTypeName() to it.name
+                        },
                     scope = scope
                 )
                 addCode(scope.generate())
@@ -680,22 +684,22 @@
      * Represents a query statement prepared in Dao implementation.
      *
      * @param fields This map holds all the member properties necessary for this query. The key is
-     *   the corresponding parameter name in the defining query method. The value is a pair from the
-     *   property declaration to definition.
-     * @param functionImpl The body of the query method implementation.
+     *   the corresponding parameter name in the defining query function. The value is a pair from
+     *   the property declaration to definition.
+     * @param functionImpl The body of the query function implementation.
      */
     data class PreparedStmtQuery(
         val fields: Map<String, Pair<XPropertySpec, Any>>,
         val functionImpl: XFunSpec
     ) {
         companion object {
-            // The key to be used in `fields` where the method requires a field that is not
+            // The key to be used in `fields` where the function requires a field that is not
             // associated with any of its parameters
             const val NO_PARAM_FIELD = "-"
         }
     }
 
-    private class InsertMethodProperty(
+    private class InsertFunctionProperty(
         val shortcutEntity: ShortcutEntity,
         val onConflictText: String,
     ) :
@@ -713,18 +717,18 @@
 
     class DeleteOrUpdateAdapterProperty(
         val shortcutEntity: ShortcutEntity,
-        val methodPrefix: String,
+        val functionPrefix: String,
         val onConflictText: String,
     ) :
         SharedPropertySpec(
-            baseName = "${methodPrefix}AdapterOf${shortcutEntityFieldNamePart(shortcutEntity)}",
+            baseName = "${functionPrefix}AdapterOf${shortcutEntityFieldNamePart(shortcutEntity)}",
             type = DELETE_OR_UPDATE_ADAPTER.parametrizedBy(shortcutEntity.dataClass.typeName)
         ) {
         override fun prepare(writer: TypeWriter, builder: XPropertySpec.Builder) {}
 
         override fun getUniqueKey(): String {
             return "${shortcutEntity.dataClass.typeName}-${shortcutEntity.entityTypeName}" +
-                "$methodPrefix$onConflictText"
+                "$functionPrefix$onConflictText"
         }
     }
 
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt b/room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
index 7d0e36f..f66b224 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
@@ -40,7 +40,7 @@
 import androidx.room.ext.decapitalize
 import androidx.room.ext.stripNonJava
 import androidx.room.solver.CodeGenScope
-import androidx.room.vo.DaoMethod
+import androidx.room.vo.DaoFunction
 import androidx.room.vo.Database
 import java.util.Locale
 import javax.lang.model.element.Modifier
@@ -112,7 +112,7 @@
                         KotlinCollectionMemberNames.MUTABLE_MAP_OF
                     )
             }
-            database.daoMethods.forEach {
+            database.daoFunctions.forEach {
                 addStatement(
                     "%L.put(%L, %T.%L())",
                     typeConvertersVar,
@@ -121,7 +121,7 @@
                         CodeLanguage.KOTLIN -> XCodeBlock.ofKotlinClassLiteral(it.dao.typeName)
                     },
                     it.dao.implTypeName,
-                    DaoWriter.GET_LIST_OF_TYPE_CONVERTERS_METHOD
+                    DaoWriter.GET_LIST_OF_TYPE_CONVERTERS_FUNCTION
                 )
             }
             addStatement("return %L", typeConvertersVar)
@@ -351,7 +351,7 @@
 
     private fun addDaoImpls(builder: XTypeSpec.Builder) {
         val scope = CodeGenScope(this)
-        database.daoMethods.forEach { method ->
+        database.daoFunctions.forEach { method ->
             val name =
                 method.dao.typeName.simpleNames.first().decapitalize(Locale.US).stripNonJava()
             val privateDaoProperty =
@@ -411,7 +411,7 @@
         }
     }
 
-    private fun createDaoGetter(method: DaoMethod, daoProperty: XPropertySpec): XFunSpec {
+    private fun createDaoGetter(method: DaoFunction, daoProperty: XPropertySpec): XFunSpec {
         val body =
             XCodeBlock.builder().applyTo { language ->
                 // For Java we implement the memoization logic in the Dao getter, meanwhile for
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt b/room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
index 0869212..f152389 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
@@ -28,7 +28,7 @@
 import androidx.room.parser.ParsedQuery
 import androidx.room.parser.Section
 import androidx.room.solver.CodeGenScope
-import androidx.room.vo.QueryMethod
+import androidx.room.vo.QueryFunction
 import androidx.room.vo.QueryParameter
 
 /** Writes the SQL query and arguments for a QueryMethod. */
@@ -39,8 +39,8 @@
 ) {
 
     constructor(
-        queryMethod: QueryMethod
-    ) : this(queryMethod.parameters, queryMethod.sectionToParamMapping, queryMethod.query)
+        queryFunction: QueryFunction
+    ) : this(queryFunction.parameters, queryFunction.sectionToParamMapping, queryFunction.query)
 
     fun prepareReadAndBind(
         outSqlQueryName: String,
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt b/room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
index 4d18e8a..c668ed4 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
@@ -56,7 +56,7 @@
 
     override fun getUniqueKey(): String {
         val relation = collector.relation
-        return "RelationCollectorMethodWriter" +
+        return "RelationCollectorFunctionWriter" +
             "-${collector.mapTypeName}" +
             "-${relation.entity.typeName.toString(CodeLanguage.JAVA)}" +
             "-${relation.entityField.columnName}" +
@@ -207,7 +207,7 @@
 
     private fun XCodeBlock.Builder.addRecursiveFetchCall(
         scope: CodeGenScope,
-        methodName: String,
+        functionName: String,
     ) {
         val utilFunction =
             RELATION_UTIL.let {
@@ -239,7 +239,7 @@
                             val recursiveCall =
                                 XCodeBlock.of(
                                     "%L(%L, %L)",
-                                    methodName,
+                                    functionName,
                                     PARAM_CONNECTION_VARIABLE,
                                     paramName
                                 )
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/BaseDaoTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/BaseDaoTest.kt
index a8095c4..48fe74f 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/BaseDaoTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/BaseDaoTest.kt
@@ -26,7 +26,7 @@
             void insertMe(T t);
         """
         ) { dao ->
-            assertThat(dao.insertMethods.size, `is`(1))
+            assertThat(dao.insertFunctions.size, `is`(1))
         }
     }
 
@@ -38,7 +38,7 @@
             void insertMe(T[] t);
         """
         ) { dao ->
-            assertThat(dao.insertMethods.size, `is`(1))
+            assertThat(dao.insertFunctions.size, `is`(1))
         }
     }
 
@@ -50,7 +50,7 @@
             void insertMe(T... t);
         """
         ) { dao ->
-            assertThat(dao.insertMethods.size, `is`(1))
+            assertThat(dao.insertFunctions.size, `is`(1))
         }
     }
 
@@ -62,7 +62,7 @@
             void insertMe(List<T> t);
         """
         ) { dao ->
-            assertThat(dao.insertMethods.size, `is`(1))
+            assertThat(dao.insertFunctions.size, `is`(1))
         }
     }
 
@@ -74,7 +74,7 @@
             void deleteMe(T t);
         """
         ) { dao ->
-            assertThat(dao.deleteMethods.size, `is`(1))
+            assertThat(dao.deleteFunctions.size, `is`(1))
         }
     }
 
@@ -86,7 +86,7 @@
             void deleteMe(T[] t);
         """
         ) { dao ->
-            assertThat(dao.deleteMethods.size, `is`(1))
+            assertThat(dao.deleteFunctions.size, `is`(1))
         }
     }
 
@@ -98,7 +98,7 @@
             void deleteMe(T... t);
         """
         ) { dao ->
-            assertThat(dao.deleteMethods.size, `is`(1))
+            assertThat(dao.deleteFunctions.size, `is`(1))
         }
     }
 
@@ -110,7 +110,7 @@
             void deleteMe(List<T> t);
         """
         ) { dao ->
-            assertThat(dao.deleteMethods.size, `is`(1))
+            assertThat(dao.deleteFunctions.size, `is`(1))
         }
     }
 
@@ -122,7 +122,7 @@
             void updateMe(T t);
         """
         ) { dao ->
-            assertThat(dao.updateMethods.size, `is`(1))
+            assertThat(dao.updateFunctions.size, `is`(1))
         }
     }
 
@@ -134,7 +134,7 @@
             void updateMe(T[] t);
         """
         ) { dao ->
-            assertThat(dao.updateMethods.size, `is`(1))
+            assertThat(dao.updateFunctions.size, `is`(1))
         }
     }
 
@@ -146,7 +146,7 @@
             void updateMe(T... t);
         """
         ) { dao ->
-            assertThat(dao.updateMethods.size, `is`(1))
+            assertThat(dao.updateFunctions.size, `is`(1))
         }
     }
 
@@ -158,7 +158,7 @@
             void updateMe(List<T> t);
         """
         ) { dao ->
-            assertThat(dao.updateMethods.size, `is`(1))
+            assertThat(dao.updateFunctions.size, `is`(1))
         }
     }
 
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
index f4ff34f..5027258 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
@@ -286,7 +286,7 @@
                 .isEqualTo(XTypeName.BOXED_SHORT.copy(nullable = true))
             assertThat(converter?.toTypeName).isEqualTo(XTypeName.BOXED_CHAR.copy(nullable = true))
             invocation.assertCompilationResult {
-                hasErrorContaining("Multiple methods define the same conversion")
+                hasErrorContaining("Multiple functions define the same conversion")
             }
         }
     }
@@ -321,7 +321,7 @@
                 if (invocation.isKsp) {
                     // no error
                 } else {
-                    hasErrorContaining("Multiple methods define the same")
+                    hasErrorContaining("Multiple functions define the same")
                 }
             }
         }
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
index 6ebead5..c8303f2 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
@@ -23,13 +23,13 @@
 import androidx.room.compiler.processing.util.XTestInvocation
 import androidx.room.compiler.processing.util.compileFiles
 import androidx.room.ext.RoomTypeNames.ROOM_DB
-import androidx.room.processor.ProcessorErrors.nullableCollectionOrArrayReturnTypeInDaoMethod
-import androidx.room.processor.ProcessorErrors.nullableComponentInDaoMethodReturnType
+import androidx.room.processor.ProcessorErrors.nullableCollectionOrArrayReturnTypeInDaoFunction
+import androidx.room.processor.ProcessorErrors.nullableComponentInDaoFunctionReturnType
 import androidx.room.runKspTestWithK1
 import androidx.room.runProcessorTestWithK1
 import androidx.room.testing.context
 import androidx.room.vo.Dao
-import androidx.room.vo.ReadQueryMethod
+import androidx.room.vo.ReadQueryFunction
 import androidx.room.vo.Warning
 import createVerifierFromEntitiesAndViews
 import java.io.File
@@ -92,7 +92,7 @@
         """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_METHOD)
+                hasErrorContaining(ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_FUNCTION)
             }
         }
     }
@@ -116,10 +116,10 @@
         ) { _, invocation ->
             invocation.assertCompilationResult {
                 hasRawOutputContaining(
-                    ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_METHOD +
+                    ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_FUNCTION +
                         " - test.library.MissingAnnotationsBaseDao.getFoo()"
                 )
-                hasErrorContaining(ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_METHOD)
+                hasErrorContaining(ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_FUNCTION)
             }
         }
     }
@@ -136,7 +136,8 @@
         """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_METHOD).onLine(8)
+                hasErrorContaining(ProcessorErrors.INVALID_ANNOTATION_COUNT_IN_DAO_FUNCTION)
+                    .onLine(8)
             }
         }
     }
@@ -151,8 +152,8 @@
                 }
                 """
         ) { dao, _ ->
-            assertThat(dao.queryMethods.size, `is`(1))
-            val method = dao.queryMethods.first()
+            assertThat(dao.queryFunctions.size, `is`(1))
+            val method = dao.queryFunctions.first()
             assertThat(method.element.jvmName, `is`("getIds"))
         }
     }
@@ -167,8 +168,8 @@
                 }
                 """
         ) { dao, _ ->
-            assertThat(dao.queryMethods.size, `is`(1))
-            val method = dao.queryMethods.first()
+            assertThat(dao.queryFunctions.size, `is`(1))
+            val method = dao.queryFunctions.first()
             assertThat(method.element.jvmName, `is`("getIds"))
         }
     }
@@ -185,11 +186,11 @@
                 }
                 """
         ) { dao, _ ->
-            assertThat(dao.queryMethods.size, `is`(1))
-            val method = dao.queryMethods.first()
+            assertThat(dao.queryFunctions.size, `is`(1))
+            val method = dao.queryFunctions.first()
             assertThat(method.element.jvmName, `is`("getIds"))
-            assertThat(dao.insertMethods.size, `is`(1))
-            val insertMethod = dao.insertMethods.first()
+            assertThat(dao.insertFunctions.size, `is`(1))
+            val insertMethod = dao.insertFunctions.first()
             assertThat(insertMethod.element.jvmName, `is`("insert"))
         }
     }
@@ -204,8 +205,8 @@
                 }
                 """
         ) { dao, _ ->
-            assertThat(dao.queryMethods.size, `is`(1))
-            val method = dao.queryMethods.first()
+            assertThat(dao.queryFunctions.size, `is`(1))
+            val method = dao.queryFunctions.first()
             assertThat(method.element.jvmName, `is`("getIds"))
         }
     }
@@ -229,9 +230,9 @@
                 `is`(setOf(Warning.ALL, Warning.QUERY_MISMATCH))
             )
 
-            dao.queryMethods.forEach {
+            dao.queryFunctions.forEach {
                 assertThat(
-                    QueryMethodProcessor(
+                    QueryFunctionProcessor(
                             baseContext = daoProcessor.context,
                             containing = dao.element.type,
                             executableElement = it.element,
@@ -297,9 +298,9 @@
                 `is`(setOf(Warning.QUERY_MISMATCH))
             )
 
-            dao.queryMethods.forEach {
+            dao.queryFunctions.forEach {
                 assertThat(
-                    QueryMethodProcessor(
+                    QueryFunctionProcessor(
                             baseContext = daoProcessor.context,
                             containing = dao.element.type,
                             executableElement = it.element,
@@ -332,9 +333,9 @@
                 }
                 """
         ) { dao, invocation ->
-            assertThat(dao.queryMethods.size, `is`(1))
+            assertThat(dao.queryFunctions.size, `is`(1))
             assertThat(
-                dao.queryMethods.filterIsInstance<ReadQueryMethod>().first().inTransaction,
+                dao.queryFunctions.filterIsInstance<ReadQueryFunction>().first().inTransaction,
                 `is`(false)
             )
             invocation.assertCompilationResult {
@@ -362,9 +363,9 @@
                 }
                 """
         ) { dao, invocation ->
-            assertThat(dao.queryMethods.size, `is`(1))
+            assertThat(dao.queryFunctions.size, `is`(1))
             assertThat(
-                dao.queryMethods.filterIsInstance<ReadQueryMethod>().first().inTransaction,
+                dao.queryFunctions.filterIsInstance<ReadQueryFunction>().first().inTransaction,
                 `is`(false)
             )
             invocation.assertCompilationResult { hasNoWarnings() }
@@ -391,9 +392,9 @@
                 """
         ) { dao, invocation ->
             // test sanity
-            assertThat(dao.queryMethods.size, `is`(1))
+            assertThat(dao.queryFunctions.size, `is`(1))
             assertThat(
-                dao.queryMethods.filterIsInstance<ReadQueryMethod>().first().inTransaction,
+                dao.queryFunctions.filterIsInstance<ReadQueryFunction>().first().inTransaction,
                 `is`(true)
             )
             invocation.assertCompilationResult { hasNoWarnings() }
@@ -410,8 +411,8 @@
                 }
                 """
         ) { dao, _ ->
-            assertThat(dao.queryMethods.size, `is`(1))
-            val method = dao.queryMethods.first()
+            assertThat(dao.queryFunctions.size, `is`(1))
+            val method = dao.queryFunctions.first()
             assertThat(method.element.jvmName, `is`("deleteAllIds"))
         }
     }
@@ -426,8 +427,8 @@
                 }
                 """
         ) { dao, invocation ->
-            assertThat(dao.queryMethods.size, `is`(1))
-            val method = dao.queryMethods.first()
+            assertThat(dao.queryFunctions.size, `is`(1))
+            val method = dao.queryFunctions.first()
             assertThat(method.element.jvmName, `is`("getAllIds"))
             invocation.assertCompilationResult {
                 hasErrorContaining(ProcessorErrors.cannotFindQueryResultAdapter("void"))
@@ -463,7 +464,7 @@
                 )
                 .process()
             invocation.assertCompilationResult {
-                hasWarningContaining(ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_METHOD)
+                hasWarningContaining(ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_FUNCTION)
             }
         }
     }
@@ -656,55 +657,55 @@
                 .process()
             invocation.assertCompilationResult {
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "kotlin.collections.List<MyEntity>?",
                         "Collection"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "com.google.common.collect.ImmutableList<MyEntity>?",
                         "Collection"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "kotlin.Array<MyEntity>?",
                         "Array"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "java.util.Optional<MyEntity>?",
                         "Optional"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "com.google.common.base.Optional<MyEntity>?",
                         "Optional"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "kotlin.collections.Map<MyEntity, MyOtherEntity>?",
                         "Collection"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "com.google.common.collect.ImmutableMap<MyEntity, MyOtherEntity>?",
                         "Collection"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "com.google.common.collect.ImmutableSetMultimap<MyEntity, MyOtherEntity>?",
                         "Collection"
                     )
                 )
                 hasWarningContaining(
-                    nullableCollectionOrArrayReturnTypeInDaoMethod(
+                    nullableCollectionOrArrayReturnTypeInDaoFunction(
                         "com.google.common.collect.ImmutableListMultimap<MyEntity, MyOtherEntity>?",
                         "Collection"
                     )
@@ -782,31 +783,31 @@
                 .process()
             invocation.assertCompilationResult {
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType("kotlin.collections.List<MyEntity?>")
+                    nullableComponentInDaoFunctionReturnType("kotlin.collections.List<MyEntity?>")
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType(
+                    nullableComponentInDaoFunctionReturnType(
                         "com.google.common.collect.ImmutableList<MyEntity?>"
                     )
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType("kotlin.Array<MyEntity?>")
+                    nullableComponentInDaoFunctionReturnType("kotlin.Array<MyEntity?>")
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType("java.util.Optional<MyEntity?>")
+                    nullableComponentInDaoFunctionReturnType("java.util.Optional<MyEntity?>")
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType(
+                    nullableComponentInDaoFunctionReturnType(
                         "com.google.common.base.Optional<MyEntity?>"
                     )
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType(
+                    nullableComponentInDaoFunctionReturnType(
                         "kotlin.collections.Map<MyEntity?, MyOtherEntity>"
                     )
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType(
+                    nullableComponentInDaoFunctionReturnType(
                         "com.google.common.collect.ImmutableMap<MyEntity?, MyOtherEntity>"
                     )
                 )
@@ -814,17 +815,17 @@
                 // convert the map to a mutable one and re-run the `findQueryResultAdapter`
                 // algorithm
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType(
+                    nullableComponentInDaoFunctionReturnType(
                         "kotlin.collections.MutableMap<MyEntity?, MyOtherEntity>"
                     )
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType(
+                    nullableComponentInDaoFunctionReturnType(
                         "com.google.common.collect.ImmutableSetMultimap<MyEntity?, MyOtherEntity>"
                     )
                 )
                 hasWarningContaining(
-                    nullableComponentInDaoMethodReturnType(
+                    nullableComponentInDaoFunctionReturnType(
                         "com.google.common.collect.ImmutableListMultimap<MyEntity?, MyOtherEntity>"
                     )
                 )
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/DataClassProcessorTargetMethodTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/DataClassProcessorTargetFunctionTest.kt
similarity index 94%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/DataClassProcessorTargetMethodTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/DataClassProcessorTargetFunctionTest.kt
index 5fdb87b..3a1f875b 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/DataClassProcessorTargetMethodTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/DataClassProcessorTargetFunctionTest.kt
@@ -26,7 +26,7 @@
 import org.junit.runners.JUnit4
 
 @RunWith(JUnit4::class)
-class DataClassProcessorTargetMethodTest {
+class DataClassProcessorTargetFunctionTest {
 
     companion object {
         val MY_DATA_CLASS = XClassName.get("foo.bar", "MyDataClass")
@@ -56,7 +56,7 @@
     }
 
     @Test
-    fun invalidAnnotationInMethod() {
+    fun invalidAnnotationInFunction() {
         val source =
             Source.java(
                 MY_DATA_CLASS.canonicalName,
@@ -67,7 +67,7 @@
 
             class MyDataClass {
                 @PrimaryKey
-                void someRandomMethod() { }
+                void someRandomFunction() { }
             }
             """
             )
@@ -84,7 +84,7 @@
     }
 
     @Test
-    fun invalidAnnotationInStaticMethod() {
+    fun invalidAnnotationInStaticFunction() {
         val source =
             Source.java(
                 MY_DATA_CLASS.canonicalName,
@@ -95,7 +95,7 @@
 
             class MyDataClass {
                 @PrimaryKey
-                static void someRandomMethod() { }
+                static void someRandomFunction() { }
             }
             """
             )
@@ -112,7 +112,7 @@
     }
 
     @Test
-    fun invalidAnnotationInAbstractMethod() {
+    fun invalidAnnotationInAbstractFunction() {
         val source =
             Source.java(
                 MY_DATA_CLASS.canonicalName,
@@ -123,7 +123,7 @@
 
             abstract class MyDataClass {
                 @PrimaryKey
-                abstract void someRandomMethod();
+                abstract void someRandomFunction();
             }
             """
             )
@@ -140,14 +140,14 @@
     }
 
     @Test
-    fun invalidAnnotationInAutoValueMethod() {
+    fun invalidAnnotationInAutoValueFunction() {
         singleRun(
             """
                 @AutoValue.CopyAnnotations
                 @PrimaryKey
                 abstract long getId();
                 @ColumnInfo(name = "column_name")
-                void someRandomMethod() { }
+                void someRandomFunction() { }
                 static MyDataClass create(long id) { return new AutoValue_MyDataClass(id); }
                 """,
             """
@@ -170,7 +170,7 @@
     }
 
     @Test
-    fun invalidAnnotationInAutoValueParentMethod() {
+    fun invalidAnnotationInAutoValueParentFunction() {
         val parent =
             """
             package foo.bar;
@@ -181,7 +181,7 @@
                 @ColumnInfo(name = "column_name")
                 abstract String getValue();
                 @ColumnInfo(name = "another_column_name")
-                void someRandomMethod() { }
+                void someRandomFunction() { }
             }
             """
         singleRunFullClass(
@@ -264,7 +264,7 @@
     }
 
     @Test
-    fun validAnnotationInAutoValueAbstractMethod() {
+    fun validAnnotationInAutoValueAbstractFunction() {
         singleRun(
             """
                 @AutoValue.CopyAnnotations
@@ -283,7 +283,7 @@
     }
 
     @Test
-    fun validAnnotationInAutoValueParentMethod() {
+    fun validAnnotationInAutoValueParentFunction() {
         val parent =
             """
             package foo.bar;
@@ -328,7 +328,7 @@
     }
 
     @Test
-    fun validAnnotationInAutoValueImplementedInterfaceMethod() {
+    fun validAnnotationInAutoValueImplementedInterfaceFunction() {
         val parent =
             """
             package foo.bar;
@@ -373,7 +373,7 @@
     }
 
     @Test
-    fun validEmbeddedAnnotationInAutoValueAbstractMethod() {
+    fun validEmbeddedAnnotationInAutoValueAbstractFunction() {
         val embeddedDataClass =
             """
             package foo.bar;
@@ -415,7 +415,7 @@
     }
 
     @Test
-    fun validRelationAnnotationInAutoValueAbstractMethod() {
+    fun validRelationAnnotationInAutoValueAbstractFunction() {
         val embeddedDataClass =
             """
             package foo.bar;
@@ -520,7 +520,7 @@
     }
 
     /**
-     * KSP and JavaAP name methods different. To feel more native, we use the name based on the
+     * KSP and JavaAP name functions differently. To feel more native, we use the name based on the
      * processor. It only matters for the test assertion
      */
     private val XTestInvocation.functionKindName: String
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
index bc483ad..be66f51a 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
@@ -40,7 +40,7 @@
 import androidx.room.testing.context
 import androidx.room.vo.Database
 import androidx.room.vo.DatabaseView
-import androidx.room.vo.ReadQueryMethod
+import androidx.room.vo.ReadQueryFunction
 import androidx.room.vo.Warning
 import com.google.auto.service.processor.AutoServiceProcessor
 import com.google.testing.junit.testparameterinjector.TestParameter
@@ -247,7 +247,7 @@
             USER,
             USER_DAO
         ) { db, _ ->
-            assertThat(db.daoMethods.size, `is`(1))
+            assertThat(db.daoFunctions.size, `is`(1))
             assertThat(db.entities.size, `is`(1))
         }
     }
@@ -267,9 +267,12 @@
             BOOK,
             BOOK_DAO
         ) { db, _ ->
-            assertThat(db.daoMethods.size, `is`(2))
+            assertThat(db.daoFunctions.size, `is`(2))
             assertThat(db.entities.size, `is`(2))
-            assertThat(db.daoMethods.map { it.element.jvmName }, `is`(listOf("userDao", "bookDao")))
+            assertThat(
+                db.daoFunctions.map { it.element.jvmName },
+                `is`(listOf("userDao", "bookDao"))
+            )
             assertThat(
                 db.entities.map { it.type.asTypeName().toString(CodeLanguage.JAVA) },
                 `is`(listOf("foo.bar.User", "foo.bar.Book"))
@@ -536,7 +539,7 @@
             USER_DAO
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.DAO_METHOD_CONFLICTS_WITH_OTHERS)
+                hasErrorContaining(ProcessorErrors.DAO_FUNCTION_CONFLICTS_WITH_OTHERS)
                 hasErrorContaining(
                     ProcessorErrors.duplicateDao("foo.bar.UserDao", listOf("userDao", "userDao2"))
                 )
@@ -924,11 +927,11 @@
             USER,
             USER_DAO
         ) { db, _ ->
-            val userDao = db.daoMethods.first().dao
-            val insertionMethod = userDao.insertMethods.find { it.element.jvmName == "insert" }
+            val userDao = db.daoFunctions.first().dao
+            val insertionMethod = userDao.insertFunctions.find { it.element.jvmName == "insert" }
             assertThat(insertionMethod, notNullValue())
             val loadOne =
-                userDao.queryMethods.filterIsInstance<ReadQueryMethod>().find {
+                userDao.queryFunctions.filterIsInstance<ReadQueryFunction>().find {
                     it.element.jvmName == "loadOne"
                 }
             assertThat(loadOne, notNullValue())
@@ -941,7 +944,7 @@
             )
 
             val withConverter =
-                userDao.queryMethods.filterIsInstance<ReadQueryMethod>().find {
+                userDao.queryFunctions.filterIsInstance<ReadQueryFunction>().find {
                     it.element.jvmName == "loadWithConverter"
                 }
             assertThat(withConverter, notNullValue())
@@ -970,9 +973,9 @@
             USER,
             USER_DAO
         ) { db, _ ->
-            val userDao = db.daoMethods.first().dao
+            val userDao = db.daoFunctions.first().dao
             val loadOne =
-                userDao.queryMethods.filterIsInstance<ReadQueryMethod>().find {
+                userDao.queryFunctions.filterIsInstance<ReadQueryFunction>().find {
                     it.element.jvmName == "loadOneDataClass"
                 }
             assertThat(loadOne, notNullValue())
@@ -981,7 +984,7 @@
             val adapterDataClass = (adapter as DataClassRowAdapter).dataClass
 
             val loadAll =
-                userDao.queryMethods.filterIsInstance<ReadQueryMethod>().find {
+                userDao.queryFunctions.filterIsInstance<ReadQueryFunction>().find {
                     it.element.jvmName == "loadAllDataClasses"
                 }
             assertThat(loadAll, notNullValue())
@@ -992,7 +995,7 @@
             assertThat(adapterDataClass, sameInstance(loadAllDataClass))
 
             val withConverter =
-                userDao.queryMethods.filterIsInstance<ReadQueryMethod>().find {
+                userDao.queryFunctions.filterIsInstance<ReadQueryFunction>().find {
                     it.element.jvmName == "loadDataClassWithConverter"
                 }
             assertThat(withConverter, notNullValue())
@@ -1261,9 +1264,9 @@
             val element = invocation.processingEnv.requireTypeElement("foo.bar.MyDb")
             val result =
                 DatabaseProcessor(baseContext = invocation.context, element = element).process()
-            assertThat(result.daoMethods).hasSize(0)
+            assertThat(result.daoFunctions).hasSize(0)
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.DATABASE_INVALID_DAO_METHOD_RETURN_TYPE)
+                hasErrorContaining(ProcessorErrors.DATABASE_INVALID_DAO_FUNCTION_RETURN_TYPE)
             }
         }
     }
@@ -1598,7 +1601,7 @@
             val element = invocation.processingEnv.requireTypeElement("foo.bar.MyDb")
             DatabaseProcessor(baseContext = invocation.context, element = element).process()
             invocation.assertCompilationResult {
-                hasWarningContaining(ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_METHOD)
+                hasWarningContaining(ProcessorErrors.JVM_NAME_ON_OVERRIDDEN_FUNCTION)
             }
         }
     }
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteFunctionProcessorTest.kt
similarity index 83%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteFunctionProcessorTest.kt
index 0a78781..687a758 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteFunctionProcessorTest.kt
@@ -20,14 +20,14 @@
 import androidx.room.compiler.processing.XType
 import androidx.room.processor.ProcessorErrors.CANNOT_FIND_DELETE_RESULT_ADAPTER
 import androidx.room.processor.ProcessorErrors.DELETE_MISSING_PARAMS
-import androidx.room.vo.DeleteMethod
+import androidx.room.vo.DeleteFunction
 import org.junit.runner.RunWith
 import org.junit.runners.JUnit4
 
 @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
 @RunWith(JUnit4::class)
-class DeleteMethodProcessorTest :
-    DeleteOrUpdateShortcutMethodProcessorTest<DeleteMethod>(Delete::class) {
+class DeleteFunctionProcessorTest :
+    DeleteOrUpdateShortcutFunctionProcessorTest<DeleteFunction>(Delete::class) {
     override fun invalidReturnTypeError(): String = CANNOT_FIND_DELETE_RESULT_ADAPTER
 
     override fun noParamsError(): String = DELETE_MISSING_PARAMS
@@ -36,7 +36,7 @@
         baseContext: Context,
         containing: XType,
         executableElement: XMethodElement
-    ): DeleteMethod {
-        return DeleteMethodProcessor(baseContext, containing, executableElement).process()
+    ): DeleteFunction {
+        return DeleteFunctionProcessor(baseContext, containing, executableElement).process()
     }
 }
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutFunctionProcessorTest.kt
similarity index 95%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutFunctionProcessorTest.kt
index 8c900a7..2fd3542 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutFunctionProcessorTest.kt
@@ -37,12 +37,12 @@
 import androidx.room.ext.RxJava3TypeNames
 import androidx.room.runProcessorTestWithK1
 import androidx.room.testing.context
-import androidx.room.vo.DeleteOrUpdateShortcutMethod
+import androidx.room.vo.DeleteOrUpdateShortcutFunction
 import kotlin.reflect.KClass
 import org.junit.Test
 
-/** Base test class for shortcut methods. */
-abstract class DeleteOrUpdateShortcutMethodProcessorTest<out T : DeleteOrUpdateShortcutMethod>(
+/** Base test class for shortcut functions. */
+abstract class DeleteOrUpdateShortcutFunctionProcessorTest<out T : DeleteOrUpdateShortcutFunction>(
     val annotation: KClass<out Annotation>
 ) {
     companion object {
@@ -113,14 +113,14 @@
 
     @Test
     fun singleNullableParamError() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user: User?)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User"))
             }
         }
     }
@@ -169,14 +169,14 @@
 
     @Test
     fun twoNullableParamError() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user1: User?, user2: User?)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User"))
                 hasErrorCount(2)
             }
         }
@@ -224,7 +224,7 @@
 
     @Test
     fun nullableListParamError() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(users: List<User?>)
@@ -232,7 +232,7 @@
         ) { _, invocation ->
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.nullableParamInShortcutMethod(
+                    ProcessorErrors.nullableParamInShortcutFunction(
                         "java.util.List<? extends foo.bar.User>"
                     )
                 )
@@ -264,14 +264,16 @@
 
     @Test
     fun nullableArrayParamError() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(users: Array<User?>)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User[]"))
+                hasErrorContaining(
+                    ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User[]")
+                )
             }
         }
     }
@@ -302,7 +304,7 @@
 
     @Test
     fun nullableSetParamError() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(users: Set<User?>)
@@ -310,7 +312,7 @@
         ) { _, invocation ->
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.nullableParamInShortcutMethod(
+                    ProcessorErrors.nullableParamInShortcutFunction(
                         "java.util.Set<? extends foo.bar.User>"
                     )
                 )
@@ -370,7 +372,7 @@
 
     @Test
     fun nullableCustomCollectionParamError() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 class MyList<Irrelevant, Item> : ArrayList<Item> {}
                 @${annotation.java.canonicalName}
@@ -379,7 +381,7 @@
         ) { _, invocation ->
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.nullableParamInShortcutMethod(
+                    ProcessorErrors.nullableParamInShortcutFunction(
                         "foo.bar.MyClass.MyList<java.lang.String, foo.bar.User>"
                     )
                 )
@@ -428,15 +430,15 @@
 
     @Test
     fun twoNullableDifferentParamError() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user1: User?, book1: Book?)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User"))
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.Book"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.Book"))
                 hasErrorCount(2)
             }
         }
@@ -492,7 +494,7 @@
                 "${KotlinTypeNames.FLOW.canonicalName}<Int>"
             )
             .forEach { type ->
-                singleShortcutMethodKotlin(
+                singleShortcutFunction(
                     """
                 @${annotation.java.canonicalName}
                 abstract suspend fun foo(user: User): $type
@@ -703,7 +705,7 @@
                 """,
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.shortcutMethodArgumentMustBeAClass("long"))
+                hasErrorContaining(ProcessorErrors.shortcutFunctionArgumentMustBeAClass("long"))
             }
         }
     }
@@ -735,7 +737,7 @@
 
     @Test
     fun nonNullVoidGuava() {
-        singleShortcutMethodKotlin(
+        singleShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user: User): ListenableFuture<Void>
@@ -799,7 +801,7 @@
         }
     }
 
-    protected fun singleShortcutMethodKotlin(
+    protected fun singleShortcutFunction(
         vararg input: String,
         additionalSources: List<Source> = emptyList(),
         handler: (T, XTestInvocation) -> Unit
@@ -834,7 +836,7 @@
             sources = commonSources + additionalSources + inputSource,
             options = mapOf(Context.BooleanProcessorOptions.GENERATE_KOTLIN.argName to "false"),
         ) { invocation ->
-            val (owner, methods) =
+            val (owner, functions) =
                 invocation.roundEnv
                     .getElementsAnnotatedWith(Dao::class.qualifiedName!!)
                     .filterIsInstance<XTypeElement>()
@@ -850,7 +852,7 @@
                 process(
                     baseContext = invocation.context,
                     containing = owner.type,
-                    executableElement = methods.first()
+                    executableElement = functions.first()
                 )
             handler(processed, invocation)
         }
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertFunctionProcessorTest.kt
similarity index 92%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/InsertMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/InsertFunctionProcessorTest.kt
index 8aba5ee..f44f14b 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertFunctionProcessorTest.kt
@@ -25,15 +25,15 @@
 import androidx.room.processor.ProcessorErrors.INSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_INSERT
 import androidx.room.processor.ProcessorErrors.INSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH
 import androidx.room.processor.ProcessorErrors.INSERT_SINGLE_PARAM_MULTI_RETURN_MISMATCH
-import androidx.room.vo.InsertMethod
+import androidx.room.vo.InsertFunction
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.JUnit4
 
 @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
 @RunWith(JUnit4::class)
-class InsertMethodProcessorTest :
-    InsertOrUpsertShortcutMethodProcessorTest<InsertMethod>(Insert::class) {
+class InsertFunctionProcessorTest :
+    InsertOrUpsertShortcutFunctionProcessorTest<InsertFunction>(Insert::class) {
     override fun noParamsError(): String = INSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_INSERT
 
     override fun missingPrimaryKey(
@@ -106,7 +106,7 @@
         baseContext: Context,
         containing: XType,
         executableElement: XMethodElement
-    ): InsertMethod {
-        return InsertMethodProcessor(baseContext, containing, executableElement).process()
+    ): InsertFunction {
+        return InsertFunctionProcessor(baseContext, containing, executableElement).process()
     }
 }
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutFunctionProcessorTest.kt
similarity index 92%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutFunctionProcessorTest.kt
index 03be0b1..7857656 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutFunctionProcessorTest.kt
@@ -36,14 +36,14 @@
 import androidx.room.ext.RxJava2TypeNames
 import androidx.room.ext.RxJava3TypeNames
 import androidx.room.runProcessorTestWithK1
-import androidx.room.solver.shortcut.result.InsertOrUpsertMethodAdapter
+import androidx.room.solver.shortcut.result.InsertOrUpsertFunctionAdapter
 import androidx.room.testing.context
-import androidx.room.vo.InsertOrUpsertShortcutMethod
+import androidx.room.vo.InsertOrUpsertShortcutFunction
 import kotlin.reflect.KClass
 import org.junit.Test
 
 /** Base test class for insert and upsert methods. */
-abstract class InsertOrUpsertShortcutMethodProcessorTest<out T : InsertOrUpsertShortcutMethod>(
+abstract class InsertOrUpsertShortcutFunctionProcessorTest<out T : InsertOrUpsertShortcutFunction>(
     val annotation: KClass<out Annotation>
 ) {
     companion object {
@@ -139,14 +139,14 @@
 
     @Test
     fun singleNullableParamError() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user: User?)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User"))
             }
         }
     }
@@ -183,14 +183,14 @@
 
     @Test
     fun twoNullableParamError() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user1: User?, user2: User?)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User"))
                 hasErrorCount(2)
             }
         }
@@ -234,7 +234,7 @@
 
     @Test
     fun nullableListParamError() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(users: List<User?>)
@@ -242,7 +242,7 @@
         ) { _, invocation ->
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.nullableParamInShortcutMethod(
+                    ProcessorErrors.nullableParamInShortcutFunction(
                         "java.util.List<? extends foo.bar.User>"
                     )
                 )
@@ -278,14 +278,16 @@
 
     @Test
     fun nullableArrayParamError() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(users: Array<User?>)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User[]"))
+                hasErrorContaining(
+                    ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User[]")
+                )
             }
         }
     }
@@ -320,7 +322,7 @@
 
     @Test
     fun nullableSetParamError() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(users: Set<User?>)
@@ -328,7 +330,7 @@
         ) { _, invocation ->
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.nullableParamInShortcutMethod(
+                    ProcessorErrors.nullableParamInShortcutFunction(
                         "java.util.Set<? extends foo.bar.User>"
                     )
                 )
@@ -422,7 +424,7 @@
 
     @Test
     fun nullableCustomCollectionParamError() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 class MyList<Irrelevant, Item> : ArrayList<Item> {}
                 @${annotation.java.canonicalName}
@@ -431,7 +433,7 @@
         ) { _, invocation ->
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.nullableParamInShortcutMethod(
+                    ProcessorErrors.nullableParamInShortcutFunction(
                         "foo.bar.MyClass.MyList<java.lang.String, foo.bar.User>"
                     )
                 )
@@ -479,7 +481,7 @@
                 RxJava3TypeNames.COMPLETABLE.canonicalName
             )
             .forEach { type ->
-                singleInsertUpsertShortcutMethodKotlin(
+                singleInsertUpsertShortcutFunction(
                     """
                 @${annotation.java.canonicalName}
                 abstract fun bookUserCompletable(user: User, book: Book): $type
@@ -492,15 +494,15 @@
 
     @Test
     fun twoNullableDifferentParamError() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user1: User?, book1: Book?)
                 """
         ) { _, invocation ->
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.User"))
-                hasErrorContaining(ProcessorErrors.nullableParamInShortcutMethod("foo.bar.Book"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.User"))
+                hasErrorContaining(ProcessorErrors.nullableParamInShortcutFunction("foo.bar.Book"))
                 hasErrorCount(2)
             }
         }
@@ -524,7 +526,7 @@
                 abstract public $type foo(User user);
                 """
                 ) { insertionUpsertion, invocation ->
-                    assertThat(insertionUpsertion.methodBinder?.adapter).isNull()
+                    assertThat(insertionUpsertion.functionBinder?.adapter).isNull()
 
                     invocation.assertCompilationResult { hasErrorContaining(noAdapter()) }
                 }
@@ -547,7 +549,7 @@
                 abstract public $type foo(User user);
                 """
                 ) { insertionUpsertion, invocation ->
-                    assertThat(insertionUpsertion.methodBinder?.adapter).isNull()
+                    assertThat(insertionUpsertion.functionBinder?.adapter).isNull()
 
                     invocation.assertCompilationResult {
                         hasErrorContaining(singleParamAndMultiReturnMismatchError())
@@ -571,7 +573,7 @@
                 abstract public $type foo(User... user);
                 """
                 ) { insertionUpsertion, invocation ->
-                    assertThat(insertionUpsertion.methodBinder?.adapter).isNull()
+                    assertThat(insertionUpsertion.functionBinder?.adapter).isNull()
 
                     invocation.assertCompilationResult {
                         hasErrorContaining(multiParamAndSingleReturnMismatchError())
@@ -595,7 +597,7 @@
                 abstract public $type foo(User user1, User user2);
                 """
                 ) { insertionUpsertion, invocation ->
-                    assertThat(insertionUpsertion.methodBinder?.adapter).isNull()
+                    assertThat(insertionUpsertion.functionBinder?.adapter).isNull()
 
                     invocation.assertCompilationResult { hasErrorContaining(noAdapter()) }
                 }
@@ -605,50 +607,50 @@
     @Test
     fun validReturnTypes() {
         listOf(
-                Pair("void", InsertOrUpsertMethodAdapter.ReturnInfo.VOID),
-                Pair("long", InsertOrUpsertMethodAdapter.ReturnInfo.SINGLE_ID),
-                Pair("long[]", InsertOrUpsertMethodAdapter.ReturnInfo.ID_ARRAY),
-                Pair("Long[]", InsertOrUpsertMethodAdapter.ReturnInfo.ID_ARRAY_BOX),
-                Pair("List<Long>", InsertOrUpsertMethodAdapter.ReturnInfo.ID_LIST),
+                Pair("void", InsertOrUpsertFunctionAdapter.ReturnInfo.VOID),
+                Pair("long", InsertOrUpsertFunctionAdapter.ReturnInfo.SINGLE_ID),
+                Pair("long[]", InsertOrUpsertFunctionAdapter.ReturnInfo.ID_ARRAY),
+                Pair("Long[]", InsertOrUpsertFunctionAdapter.ReturnInfo.ID_ARRAY_BOX),
+                Pair("List<Long>", InsertOrUpsertFunctionAdapter.ReturnInfo.ID_LIST),
                 Pair(
                     RxJava2TypeNames.COMPLETABLE.canonicalName,
-                    InsertOrUpsertMethodAdapter.ReturnInfo.VOID_OBJECT
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.VOID_OBJECT
                 ),
                 Pair(
                     "${RxJava2TypeNames.SINGLE.canonicalName}<Long>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.SINGLE_ID
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.SINGLE_ID
                 ),
                 Pair(
                     "${RxJava2TypeNames.SINGLE.canonicalName}<List<Long>>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.ID_LIST
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.ID_LIST
                 ),
                 Pair(
                     "${RxJava2TypeNames.MAYBE.canonicalName}<Long>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.SINGLE_ID
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.SINGLE_ID
                 ),
                 Pair(
                     "${RxJava2TypeNames.MAYBE.canonicalName}<List<Long>>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.ID_LIST
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.ID_LIST
                 ),
                 Pair(
                     RxJava3TypeNames.COMPLETABLE.canonicalName,
-                    InsertOrUpsertMethodAdapter.ReturnInfo.VOID_OBJECT
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.VOID_OBJECT
                 ),
                 Pair(
                     "${RxJava3TypeNames.SINGLE.canonicalName}<Long>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.SINGLE_ID
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.SINGLE_ID
                 ),
                 Pair(
                     "${RxJava3TypeNames.SINGLE.canonicalName}<List<Long>>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.ID_LIST
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.ID_LIST
                 ),
                 Pair(
                     "${RxJava3TypeNames.MAYBE.canonicalName}<Long>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.SINGLE_ID
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.SINGLE_ID
                 ),
                 Pair(
                     "${RxJava3TypeNames.MAYBE.canonicalName}<List<Long>>",
-                    InsertOrUpsertMethodAdapter.ReturnInfo.ID_LIST
+                    InsertOrUpsertFunctionAdapter.ReturnInfo.ID_LIST
                 )
             )
             .forEach { pair ->
@@ -656,9 +658,9 @@
                     if (
                         pair.second in
                             setOf(
-                                InsertOrUpsertMethodAdapter.ReturnInfo.ID_LIST,
-                                InsertOrUpsertMethodAdapter.ReturnInfo.ID_ARRAY,
-                                InsertOrUpsertMethodAdapter.ReturnInfo.ID_ARRAY_BOX
+                                InsertOrUpsertFunctionAdapter.ReturnInfo.ID_LIST,
+                                InsertOrUpsertFunctionAdapter.ReturnInfo.ID_ARRAY,
+                                InsertOrUpsertFunctionAdapter.ReturnInfo.ID_ARRAY_BOX
                             )
                     ) {
                         "..."
@@ -671,7 +673,7 @@
                 abstract public ${pair.first} foo(User$dots user);
                 """
                 ) { insertionUpsertion, _ ->
-                    assertThat(insertionUpsertion.methodBinder?.adapter).isNotNull()
+                    assertThat(insertionUpsertion.functionBinder?.adapter).isNotNull()
                 }
             }
     }
@@ -1091,7 +1093,7 @@
                 "${KotlinTypeNames.FLOW.canonicalName}<Int>"
             )
             .forEach { type ->
-                singleInsertUpsertShortcutMethodKotlin(
+                singleInsertUpsertShortcutFunction(
                     """
                 @${annotation.java.canonicalName}
                 abstract suspend fun foo(user: User): $type
@@ -1107,7 +1109,7 @@
 
     @Test
     fun nonNullVoidGuava() {
-        singleInsertUpsertShortcutMethodKotlin(
+        singleInsertUpsertShortcutFunction(
             """
                 @${annotation.java.canonicalName}
                 abstract fun foo(user: User): ListenableFuture<Void>
@@ -1168,7 +1170,7 @@
         }
     }
 
-    protected fun singleInsertUpsertShortcutMethodKotlin(
+    protected fun singleInsertUpsertShortcutFunction(
         vararg input: String,
         additionalSources: List<Source> = emptyList(),
         handler: (T, XTestInvocation) -> Unit
@@ -1202,7 +1204,7 @@
             sources = commonSources + additionalSources + inputSource,
             options = mapOf(Context.BooleanProcessorOptions.GENERATE_KOTLIN.argName to "false"),
         ) { invocation ->
-            val (owner, methods) =
+            val (owner, functions) =
                 invocation.roundEnv
                     .getElementsAnnotatedWith(Dao::class.qualifiedName!!)
                     .filterIsInstance<XTypeElement>()
@@ -1217,7 +1219,7 @@
                 process(
                     baseContext = invocation.context,
                     containing = owner.type,
-                    executableElement = methods.first()
+                    executableElement = functions.first()
                 )
             handler(processed, invocation)
         }
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/QueryFunctionProcessorTest.kt
similarity index 94%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/QueryFunctionProcessorTest.kt
index d00ef58..10f2366 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/QueryFunctionProcessorTest.kt
@@ -54,10 +54,10 @@
 import androidx.room.solver.query.result.SingleItemQueryResultAdapter
 import androidx.room.testing.context
 import androidx.room.vo.Field
-import androidx.room.vo.QueryMethod
-import androidx.room.vo.ReadQueryMethod
+import androidx.room.vo.QueryFunction
+import androidx.room.vo.ReadQueryFunction
 import androidx.room.vo.Warning
-import androidx.room.vo.WriteQueryMethod
+import androidx.room.vo.WriteQueryFunction
 import createVerifierFromEntitiesAndViews
 import mockElementAndType
 import org.junit.AssumptionViolatedException
@@ -67,7 +67,7 @@
 import org.mockito.Mockito
 
 @RunWith(Parameterized::class)
-class QueryMethodProcessorTest(private val enableVerification: Boolean) {
+class QueryFunctionProcessorTest(private val enableVerification: Boolean) {
     companion object {
         const val DAO_PREFIX =
             """
@@ -115,7 +115,7 @@
 
     @Test
     fun testReadNoParams() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT uid from User")
                 abstract public int[] foo();
@@ -130,7 +130,7 @@
 
     @Test
     fun testSingleParam() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT * from User where uid = :x")
                 abstract public long foo(int x);
@@ -149,7 +149,7 @@
 
     @Test
     fun testVarArgs() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT * from User where uid in (:ids)")
                 abstract public long foo(int... ids);
@@ -168,7 +168,7 @@
 
     @Test
     fun testParamBindingMatchingNoName() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT uid from User where uid = :id")
                 abstract public long getIdById(int id);
@@ -184,7 +184,7 @@
 
     @Test
     fun testParamBindingMatchingSimpleBind() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT uid from User where uid = :id")
                 abstract public long getIdById(int id);
@@ -200,7 +200,7 @@
 
     @Test
     fun testParamBindingTwoBindVarsIntoTheSameParameter() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT uid from User where uid = :id OR uid = :id")
                 abstract public long getIdById(int id);
@@ -219,7 +219,7 @@
 
     @Test
     fun testMissingParameterForBinding() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT uid from User where uid = :id OR uid = :uid")
                 abstract public long getIdById(int id);
@@ -241,7 +241,7 @@
 
     @Test
     fun test2MissingParameterForBinding() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT uid from User where name = :bar AND uid = :id OR uid = :uid")
                 abstract public long getIdById(int id);
@@ -268,7 +268,7 @@
 
     @Test
     fun testUnusedParameters() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT uid from User where name = :bar")
                 abstract public long getIdById(int bar, int whyNotUseMe);
@@ -281,7 +281,7 @@
             assertThat(parsedQuery.sectionToParamMapping).containsExactly(bar to barParam)
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.unusedQueryMethodParameter(listOf("whyNotUseMe"))
+                    ProcessorErrors.unusedQueryFunctionParameter(listOf("whyNotUseMe"))
                 )
             }
         }
@@ -289,7 +289,7 @@
 
     @Test
     fun testNameWithUnderscore() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from User where uid = :_blah")
                 abstract public long getSth(int _blah);
@@ -303,7 +303,7 @@
 
     @Test
     fun testGenericReturnType() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from User")
                 abstract public <T> ${LIST.canonicalName}<T> foo(int x);
@@ -320,14 +320,14 @@
                     .copy(nullable = true)
             assertThat(parsedQuery.returnType.asTypeName()).isEqualTo(expected)
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_METHODS)
+                hasErrorContaining(ProcessorErrors.CANNOT_USE_UNBOUND_GENERICS_IN_QUERY_FUNCTIONS)
             }
         }
     }
 
     @Test
     fun testBadQuery() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from :1 :2")
                 abstract public long foo(int x);
@@ -340,7 +340,7 @@
 
     @Test
     fun testLiveDataWithWithClause() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("WITH RECURSIVE tempTable(n, fact) AS (SELECT 0, 1 UNION ALL SELECT n+1,"
                 + " (n+1)*fact FROM tempTable WHERE n < 9) SELECT fact FROM tempTable, User")
@@ -356,7 +356,7 @@
 
     @Test
     fun testLiveDataWithNothingToObserve() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT 1")
                 abstract public ${LifecyclesTypeNames.LIVE_DATA.canonicalName}<Integer> getOne();
@@ -370,7 +370,7 @@
 
     @Test
     fun testLiveDataWithWithClauseAndNothingToObserve() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("WITH RECURSIVE tempTable(n, fact) AS (SELECT 0, 1 UNION ALL SELECT n+1,"
                 + " (n+1)*fact FROM tempTable WHERE n < 9) SELECT fact FROM tempTable")
@@ -386,7 +386,7 @@
 
     @Test
     fun testBoundGeneric() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 static abstract class BaseModel<T> {
                     @Query("select COUNT(*) from User")
@@ -404,7 +404,7 @@
 
     @Test
     fun testBoundGenericParameter() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 static abstract class BaseModel<T> {
                     @Query("select COUNT(*) from User where :t")
@@ -422,7 +422,7 @@
 
     @Test
     fun testReadDeleteWithBadReturnType() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("DELETE from User where uid = :id")
                 abstract public float foo(int id);
@@ -438,7 +438,7 @@
 
     @Test
     fun testSimpleDelete() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("DELETE from User where uid = :id")
                 abstract public int foo(int id);
@@ -452,7 +452,7 @@
 
     @Test
     fun testVoidDeleteQuery() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("DELETE from User where uid = :id")
                 abstract public void foo(int id);
@@ -466,7 +466,7 @@
 
     @Test
     fun testVoidUpdateQuery() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("update user set name = :name")
                 abstract public void updateAllNames(String name);
@@ -482,7 +482,7 @@
 
     @Test
     fun testVoidInsertQuery() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("insert into user (name) values (:name)")
                 abstract public void insertUsername(String name);
@@ -498,7 +498,7 @@
 
     @Test
     fun testLongInsertQuery() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("insert into user (name) values (:name)")
                 abstract public long insertUsername(String name);
@@ -514,7 +514,7 @@
 
     @Test
     fun testInsertQueryWithBadReturnType() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("insert into user (name) values (:name)")
                 abstract public int insert(String name);
@@ -531,7 +531,7 @@
 
     @Test
     fun testLiveDataQuery() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select name from user where uid = :id")
                 abstract ${LifecyclesTypeNames.LIVE_DATA.canonicalName}<String> nameLiveData(String id);
@@ -549,7 +549,7 @@
 
     @Test
     fun testBadReturnForDeleteQuery() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("delete from user where uid = :id")
                 abstract ${LifecyclesTypeNames.LIVE_DATA.canonicalName}<Integer> deleteLiveData(String id);
@@ -568,7 +568,7 @@
 
     @Test
     fun testBadReturnForUpdateQuery() {
-        singleQueryMethod<WriteQueryMethod>(
+        singleQueryMethod<WriteQueryFunction>(
             """
                 @Query("update user set name = :name")
                 abstract ${LifecyclesTypeNames.LIVE_DATA.canonicalName}<Integer> updateNameLiveData(String name);
@@ -587,7 +587,7 @@
 
     @Test
     fun testDataSourceFactoryQuery() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select name from user")
                 abstract ${PagingTypeNames.DATA_SOURCE_FACTORY.canonicalName}<Integer, String>
@@ -615,7 +615,7 @@
 
     @Test
     fun testMultiTableDataSourceFactoryQuery() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select name from User u LEFT OUTER JOIN Book b ON u.uid == b.uid")
                 abstract ${PagingTypeNames.DATA_SOURCE_FACTORY.canonicalName}<Integer, String>
@@ -642,7 +642,7 @@
 
     @Test
     fun testBadChannelReturnForQuery() {
-        singleQueryMethod<QueryMethod>(
+        singleQueryMethod<QueryFunction>(
             """
                 @Query("select * from user")
                 abstract ${KotlinTypeNames.CHANNEL.canonicalName}<User> getUsersChannel();
@@ -659,7 +659,7 @@
 
     @Test
     fun testBadSendChannelReturnForQuery() {
-        singleQueryMethod<QueryMethod>(
+        singleQueryMethod<QueryFunction>(
             """
                 @Query("select * from user")
                 abstract ${KotlinTypeNames.SEND_CHANNEL.canonicalName}<User> getUsersChannel();
@@ -676,7 +676,7 @@
 
     @Test
     fun testBadReceiveChannelReturnForQuery() {
-        singleQueryMethod<QueryMethod>(
+        singleQueryMethod<QueryFunction>(
             """
                 @Query("select * from user")
                 abstract ${KotlinTypeNames.RECEIVE_CHANNEL.canonicalName}<User> getUsersChannel();
@@ -695,7 +695,7 @@
 
     @Test
     fun query_detectTransaction_select() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from user")
                 abstract int loadUsers();
@@ -707,7 +707,7 @@
 
     @Test
     fun query_detectTransaction_selectInTransaction() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Transaction
                 @Query("select * from user")
@@ -720,7 +720,7 @@
 
     @Test
     fun skipVerification() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SkipQueryVerification
                 @Query("SELECT foo from User")
@@ -736,7 +736,7 @@
 
     @Test
     fun skipVerificationDataClass() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SkipQueryVerification
                 @Query("SELECT bookId, uid  FROM User")
@@ -758,7 +758,7 @@
 
     @Test
     fun suppressWarnings() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(RoomWarnings.QUERY_MISMATCH)
                 @Query("SELECT uid from User")
@@ -766,7 +766,7 @@
                 """
         ) { method, invocation ->
             assertThat(
-                    QueryMethodProcessor(
+                    QueryFunctionProcessor(
                             baseContext = invocation.context,
                             containing = Mockito.mock(XType::class.java),
                             executableElement = method.element,
@@ -785,7 +785,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 static class Merged extends User {
                    @Relation(parentColumn = "name", entityColumn = "lastName",
@@ -865,7 +865,7 @@
         if (!enableVerification) {
             throw AssumptionViolatedException("nothing to test w/o db verification")
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @RewriteQueriesToDropUnusedColumns
                 @Query("select 1 from user")
@@ -884,7 +884,7 @@
         if (!enableVerification) {
             throw AssumptionViolatedException("nothing to test w/o db verification")
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 public static class DataClass {
                     public String name;
@@ -923,7 +923,7 @@
             """
                     .trimIndent()
             )
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 public static class Username {
                     public String name;
@@ -960,7 +960,7 @@
         if (!enableVerification) {
             throw AssumptionViolatedException("nothing to test w/o db verification")
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 public static class DataClass {
                     public String name;
@@ -1190,9 +1190,9 @@
         dataClassFields: String,
         queryColumns: List<String>,
         options: Map<String, String> = emptyMap(),
-        handler: (DataClassRowAdapter?, QueryMethod, XTestInvocation) -> Unit
+        handler: (DataClassRowAdapter?, QueryFunction, XTestInvocation) -> Unit
     ) {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 static class DataClass {
                     $dataClassFields
@@ -1219,7 +1219,7 @@
         }
     }
 
-    private fun <T : QueryMethod> singleQueryMethod(
+    private fun <T : QueryFunction> singleQueryMethod(
         vararg input: String,
         additionalSources: Iterable<Source> = emptyList(),
         options: Map<String, String> = emptyMap(),
@@ -1269,7 +1269,7 @@
                     null
                 }
             val parser =
-                QueryMethodProcessor(
+                QueryFunctionProcessor(
                     baseContext = invocation.context,
                     containing = owner.type,
                     executableElement = methods.first(),
@@ -1280,7 +1280,7 @@
         }
     }
 
-    private fun <T : QueryMethod> singleQueryMethodKotlin(
+    private fun <T : QueryFunction> singleQueryFunction(
         vararg input: String,
         additionalSources: Iterable<Source> = emptyList(),
         options: Map<String, String> = emptyMap(),
@@ -1339,7 +1339,7 @@
                     null
                 }
             val parser =
-                QueryMethodProcessor(
+                QueryFunctionProcessor(
                     baseContext = invocation.context,
                     containing = owner.type,
                     executableElement = methods.first(),
@@ -1352,7 +1352,7 @@
 
     @Test
     fun testInvalidLinkedListCollectionInMultimapJoin() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from User u JOIN Book b ON u.uid == b.uid")
                 abstract Map<User, LinkedList<Book>> getInvalidCollectionMultimap();
@@ -1362,7 +1362,7 @@
                 hasErrorCount(2)
                 hasErrorContaining("Multimap 'value' collection type must be a List, Set or Map.")
                 hasErrorContaining(
-                    "Not sure how to convert the query result to this method's return type"
+                    "Not sure how to convert the query result to this function's return type"
                 )
             }
         }
@@ -1370,7 +1370,7 @@
 
     @Test
     fun testInvalidGenericMultimapJoin() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from User u JOIN Book b ON u.uid == b.uid")
                 abstract com.google.common.collect.ImmutableMultimap<User, Book>
@@ -1381,7 +1381,7 @@
                 hasErrorCount(2)
                 hasErrorContaining(DO_NOT_USE_GENERIC_IMMUTABLE_MULTIMAP)
                 hasErrorContaining(
-                    "Not sure how to convert the query result to this method's return type"
+                    "Not sure how to convert the query result to this function's return type"
                 )
             }
         }
@@ -1392,7 +1392,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @MapInfo
                 @Query("select * from User u JOIN Book b ON u.uid == b.uid")
@@ -1411,7 +1411,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(
                     {RoomWarnings.QUERY_MISMATCH, RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT}
@@ -1430,7 +1430,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(
                     {RoomWarnings.QUERY_MISMATCH, RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT}
@@ -1449,7 +1449,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(RoomWarnings.QUERY_MISMATCH)
                 @MapInfo(keyColumn = "name", valueColumn = "bookCount")
@@ -1467,7 +1467,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(
                     {RoomWarnings.QUERY_MISMATCH, RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT}
@@ -1485,7 +1485,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(
                     {RoomWarnings.QUERY_MISMATCH, RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT}
@@ -1508,7 +1508,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(
                     {RoomWarnings.QUERY_MISMATCH, RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT}
@@ -1526,7 +1526,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(
                     {RoomWarnings.QUERY_MISMATCH, RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT}
@@ -1544,7 +1544,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(RoomWarnings.QUERY_MISMATCH)
                 @Query("SELECT name, (SELECT count(*) FROM User u JOIN Book b ON u.uid == b.uid) "
@@ -1561,7 +1561,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(
                     {RoomWarnings.QUERY_MISMATCH, RoomWarnings.AMBIGUOUS_COLUMN_IN_RESULT}
@@ -1579,7 +1579,7 @@
 
     @Test
     fun testDoesNotImplementEqualsAndHashcodeQuery() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from User u JOIN Book b ON u.uid == b.uid")
                 abstract Map<User, Book> getMultimap();
@@ -1596,7 +1596,7 @@
 
     @Test
     fun testMissingMapInfoOneToOneString() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from Artist JOIN Song ON Artist.mArtistName == Song.mArtist")
                 abstract Map<Artist, String> getAllArtistsWithAlbumCoverYear();
@@ -1610,7 +1610,7 @@
 
     @Test
     fun testOneToOneStringMapInfoForKeyInsteadOfColumn() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @MapInfo(keyColumn = "mArtistName")
                 @Query("select * from Artist JOIN Song ON Artist.mArtistName == Song.mArtist")
@@ -1625,7 +1625,7 @@
 
     @Test
     fun testMissingMapInfoOneToManyString() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from Artist JOIN Song ON Artist.mArtistName == Song.mArtist")
                 abstract Map<Artist, List<String>> getAllArtistsWithAlbumCoverYear();
@@ -1639,7 +1639,7 @@
 
     @Test
     fun testMissingMapInfoImmutableListMultimapOneToOneString() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from Artist JOIN Song ON Artist.mArtistName == Song.mArtist")
                 abstract ImmutableListMultimap<Artist, String> getAllArtistsWithAlbumCoverYear();
@@ -1653,7 +1653,7 @@
 
     @Test
     fun testMissingMapInfoOneToOneLong() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT * FROM Artist JOIN Image ON Artist.mArtistName = Image.mArtistInImage")
                 Map<Artist, Long> getAllArtistsWithAlbumCoverYear();
@@ -1667,7 +1667,7 @@
 
     @Test
     fun testMissingMapInfoOneToManyLong() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT * FROM Artist JOIN Image ON Artist.mArtistName = Image.mArtistInImage")
                 Map<Artist, Set<Long>> getAllArtistsWithAlbumCoverYear();
@@ -1681,7 +1681,7 @@
 
     @Test
     fun testMissingMapInfoImmutableListMultimapOneToOneLong() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("SELECT * FROM Artist JOIN Image ON Artist.mArtistName = Image.mArtistInImage")
                 ImmutableListMultimap<Artist, Long> getAllArtistsWithAlbumCoverYear();
@@ -1695,7 +1695,7 @@
 
     @Test
     fun testMissingMapInfoImmutableListMultimapOneToOneTypeConverterKey() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @TypeConverters(DateConverter.class)
                 @Query("SELECT * FROM Image JOIN Artist ON Artist.mArtistName = Image.mArtistInImage")
@@ -1710,7 +1710,7 @@
 
     @Test
     fun testMissingMapInfoImmutableListMultimapOneToOneTypeConverterValue() {
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @TypeConverters(DateConverter.class)
                 @Query("SELECT * FROM Artist JOIN Image ON Artist.mArtistName = Image.mArtistInImage")
@@ -1728,7 +1728,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @MapInfo(keyColumn="cat", valueColumn="dog")
                 @Query("select * from User u JOIN Book b ON u.uid == b.uid")
@@ -1759,7 +1759,7 @@
             // No warning without verification, avoiding false positives
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(RoomWarnings.QUERY_MISMATCH)
                 @MapInfo(keyColumn = "uid")
@@ -1806,7 +1806,7 @@
             """
                     .trimIndent()
             )
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @SuppressWarnings(RoomWarnings.QUERY_MISMATCH)
                 @Query("SELECT * FROM User u JOIN Book b ON u.uid == b.uid")
@@ -1846,7 +1846,7 @@
                 "${KotlinTypeNames.FLOW.canonicalName}<Int>"
             )
             .forEach { type ->
-                singleQueryMethodKotlin<WriteQueryMethod>(
+                singleQueryFunction<WriteQueryFunction>(
                     """
                 @Query("DELETE from User where uid = :id")
                 abstract suspend fun foo(id: Int): $type
@@ -1862,7 +1862,7 @@
 
     @Test
     fun nonNullVoidGuava() {
-        singleQueryMethodKotlin<WriteQueryMethod>(
+        singleQueryFunction<WriteQueryFunction>(
             """
                 @Query("DELETE from User where uid = :id")
                 abstract fun foo(id: Int): ListenableFuture<Void>
@@ -1874,7 +1874,7 @@
 
     @Test
     fun maybe() {
-        singleQueryMethodKotlin<ReadQueryMethod>(
+        singleQueryFunction<ReadQueryFunction>(
             """
                 @Query("SELECT * FROM book WHERE bookId = :bookId")
                 abstract fun getBookMaybe(bookId: String): io.reactivex.Maybe<Book>
@@ -1886,7 +1886,7 @@
 
     @Test
     fun single() {
-        singleQueryMethodKotlin<ReadQueryMethod>(
+        singleQueryFunction<ReadQueryFunction>(
             """
                 @Query("SELECT * FROM book WHERE bookId = :bookId")
                 abstract fun getBookSingle(bookId: String): io.reactivex.Single<Book>
@@ -1901,7 +1901,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from User")
                 abstract String[] stringArray();
@@ -1920,7 +1920,7 @@
         if (!enableVerification) {
             return
         }
-        singleQueryMethod<ReadQueryMethod>(
+        singleQueryMethod<ReadQueryFunction>(
             """
                 @Query("select * from User")
                 abstract long[] longArray();
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryFunctionProcessorTest.kt
similarity index 95%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryFunctionProcessorTest.kt
index 7bacb42..5a851a5 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryFunctionProcessorTest.kt
@@ -37,13 +37,13 @@
 import androidx.room.processor.ProcessorErrors.RAW_QUERY_STRING_PARAMETER_REMOVED
 import androidx.room.runProcessorTestWithK1
 import androidx.room.testing.context
-import androidx.room.vo.RawQueryMethod
+import androidx.room.vo.RawQueryFunction
 import androidx.sqlite.db.SupportSQLiteQuery
 import org.hamcrest.CoreMatchers.`is`
 import org.hamcrest.MatcherAssert.assertThat
 import org.junit.Test
 
-class RawQueryMethodProcessorTest {
+class RawQueryFunctionProcessorTest {
     @Test
     fun supportRawQuery() {
         singleQueryMethod(
@@ -56,7 +56,7 @@
             assertThat(
                 query.runtimeQueryParam,
                 `is`(
-                    RawQueryMethod.RuntimeQueryParameter(
+                    RawQueryFunction.RuntimeQueryParameter(
                         paramName = "query",
                         typeName = SupportDbTypeNames.QUERY
                     )
@@ -95,7 +95,7 @@
             assertThat(
                 query.runtimeQueryParam,
                 `is`(
-                    RawQueryMethod.RuntimeQueryParameter(
+                    RawQueryFunction.RuntimeQueryParameter(
                         paramName = "query",
                         typeName = SupportDbTypeNames.QUERY
                     )
@@ -118,7 +118,7 @@
             assertThat(
                 query.runtimeQueryParam,
                 `is`(
-                    RawQueryMethod.RuntimeQueryParameter(
+                    RawQueryFunction.RuntimeQueryParameter(
                         paramName = "query",
                         typeName = SupportDbTypeNames.QUERY
                     )
@@ -190,7 +190,7 @@
             assertThat(
                 query.runtimeQueryParam,
                 `is`(
-                    RawQueryMethod.RuntimeQueryParameter(
+                    RawQueryFunction.RuntimeQueryParameter(
                         paramName = "query",
                         typeName = SupportDbTypeNames.QUERY
                     )
@@ -225,7 +225,7 @@
             val daoElement =
                 invocation.processingEnv.requireTypeElement(RawQuerySuspendUnitDao::class)
             val daoFunctionElement = daoElement.getDeclaredMethods().first()
-            RawQueryMethodProcessor(
+            RawQueryFunctionProcessor(
                     baseContext = invocation.context,
                     containing = daoElement.type,
                     executableElement = daoFunctionElement
@@ -341,8 +341,8 @@
                 @RawQuery(observedEntities = MyDataClass.class)
                 abstract public int[] foo(SupportSQLiteQuery query);
                 """
-        ) { method, _ ->
-            assertThat(method.observedTableNames, `is`(setOf("User")))
+        ) { function, _ ->
+            assertThat(function.observedTableNames, `is`(setOf("User")))
         }
     }
 
@@ -358,8 +358,8 @@
                 @RawQuery(observedEntities = MyDataClass.class)
                 abstract public int[] foo(SupportSQLiteQuery query);
                 """
-        ) { method, _ ->
-            assertThat(method.observedTableNames, `is`(setOf("User")))
+        ) { function, _ ->
+            assertThat(function.observedTableNames, `is`(setOf("User")))
         }
     }
 
@@ -598,7 +598,7 @@
                 "${KotlinTypeNames.FLOW.canonicalName}<Int>"
             )
             .forEach { type ->
-                singleQueryMethodKotlin(
+                singleQueryFunction(
                     """
                 @RawQuery
                 abstract suspend fun foo(query: SupportSQLiteQuery): $type
@@ -614,7 +614,7 @@
 
     @Test
     fun nonNullVoidGuava() {
-        singleQueryMethodKotlin(
+        singleQueryFunction(
             """
                 @RawQuery
                 abstract fun foo(query: SupportSQLiteQuery): ListenableFuture<Void>
@@ -626,7 +626,7 @@
 
     private fun singleQueryMethod(
         vararg input: String,
-        handler: (RawQueryMethod, XTestInvocation) -> Unit
+        handler: (RawQueryFunction, XTestInvocation) -> Unit
     ) {
         val inputSource =
             Source.java("foo.bar.MyClass", DAO_PREFIX + input.joinToString("\n") + DAO_SUFFIX)
@@ -649,7 +649,7 @@
             sources = commonSources + inputSource,
             options = mapOf(Context.BooleanProcessorOptions.GENERATE_KOTLIN.argName to "false"),
         ) { invocation ->
-            val (owner, methods) =
+            val (owner, functions) =
                 invocation.roundEnv
                     .getElementsAnnotatedWith(Dao::class.qualifiedName!!)
                     .filterIsInstance<XTypeElement>()
@@ -661,19 +661,19 @@
                     }
                     .first { it.second.isNotEmpty() }
             val parser =
-                RawQueryMethodProcessor(
+                RawQueryFunctionProcessor(
                     baseContext = invocation.context,
                     containing = owner.type,
-                    executableElement = methods.first()
+                    executableElement = functions.first()
                 )
             val parsedQuery = parser.process()
             handler(parsedQuery, invocation)
         }
     }
 
-    private fun singleQueryMethodKotlin(
+    private fun singleQueryFunction(
         vararg input: String,
-        handler: (RawQueryMethod, XTestInvocation) -> Unit
+        handler: (RawQueryFunction, XTestInvocation) -> Unit
     ) {
         val inputSource =
             Source.kotlin("MyClass.kt", DAO_PREFIX_KT + input.joinToString("\n") + DAO_SUFFIX)
@@ -700,7 +700,7 @@
                 COMMON.GUAVA_ROOM
             )
         runProcessorTestWithK1(sources = commonSources + inputSource) { invocation ->
-            val (owner, methods) =
+            val (owner, functions) =
                 invocation.roundEnv
                     .getElementsAnnotatedWith(Dao::class.qualifiedName!!)
                     .filterIsInstance<XTypeElement>()
@@ -712,10 +712,10 @@
                     }
                     .first { it.second.isNotEmpty() }
             val parser =
-                RawQueryMethodProcessor(
+                RawQueryFunctionProcessor(
                     baseContext = invocation.context,
                     containing = owner.type,
-                    executableElement = methods.first()
+                    executableElement = functions.first()
                 )
             val parsedQuery = parser.process()
             handler(parsedQuery, invocation)
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionFunctionProcessorTest.kt
similarity index 91%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionFunctionProcessorTest.kt
index 9354625..6edea0d 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionFunctionProcessorTest.kt
@@ -32,7 +32,7 @@
 import androidx.room.ext.RxJava3TypeNames
 import androidx.room.runProcessorTestWithK1
 import androidx.room.testing.context
-import androidx.room.vo.TransactionMethod
+import androidx.room.vo.TransactionFunction
 import org.hamcrest.CoreMatchers.`is`
 import org.hamcrest.MatcherAssert.assertThat
 import org.junit.Test
@@ -41,7 +41,7 @@
 
 @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
 @RunWith(JUnit4::class)
-class TransactionMethodProcessorTest {
+class TransactionFunctionProcessorTest {
 
     companion object {
         const val DAO_PREFIX =
@@ -80,7 +80,7 @@
         ) { transaction, invocation ->
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.TRANSACTION_METHOD_MODIFIERS)
+                hasErrorContaining(ProcessorErrors.TRANSACTION_FUNCTION_MODIFIERS)
             }
         }
     }
@@ -95,7 +95,7 @@
         ) { transaction, invocation ->
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
-                hasErrorContaining(ProcessorErrors.TRANSACTION_METHOD_MODIFIERS)
+                hasErrorContaining(ProcessorErrors.TRANSACTION_FUNCTION_MODIFIERS)
             }
         }
     }
@@ -113,7 +113,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         FLOW.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -132,7 +132,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         LIVE_DATA.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -151,7 +151,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         COMPUTABLE_LIVE_DATA.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -170,7 +170,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         RxJava2TypeNames.FLOWABLE.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -191,7 +191,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         RxJava3TypeNames.FLOWABLE.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -210,7 +210,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         RxJava2TypeNames.COMPLETABLE.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -231,7 +231,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         RxJava3TypeNames.COMPLETABLE.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -250,7 +250,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         RxJava2TypeNames.SINGLE.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -271,7 +271,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         RxJava3TypeNames.SINGLE.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -290,7 +290,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         LISTENABLE_FUTURE.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -309,7 +309,7 @@
             assertThat(transaction.jvmName, `is`("doInTransaction"))
             invocation.assertCompilationResult {
                 hasErrorContaining(
-                    ProcessorErrors.transactionMethodAsync(
+                    ProcessorErrors.transactionFunctionAsync(
                         PUBLISHER.rawTypeName.toString(CodeLanguage.JAVA)
                     )
                 )
@@ -317,12 +317,12 @@
         }
     }
 
-    private val TransactionMethod.jvmName: String
+    private val TransactionFunction.jvmName: String
         get() = element.jvmName
 
     private fun singleTransactionMethod(
         vararg input: String,
-        handler: (TransactionMethod, XTestInvocation) -> Unit
+        handler: (TransactionFunction, XTestInvocation) -> Unit
     ) {
         val inputSource =
             listOf(
@@ -360,7 +360,7 @@
                     }
                     .first { it.second.isNotEmpty() }
             val processor =
-                TransactionMethodProcessor(
+                TransactionFunctionProcessor(
                     baseContext = invocation.context,
                     containingElement = owner,
                     containingType = owner.type,
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/UpdateMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/UpdateFunctionProcessorTest.kt
similarity index 92%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/UpdateMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/UpdateFunctionProcessorTest.kt
index f5a3a5a..b9b31bd 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/UpdateMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/UpdateFunctionProcessorTest.kt
@@ -22,7 +22,7 @@
 import androidx.room.compiler.processing.util.Source
 import androidx.room.processor.ProcessorErrors.CANNOT_FIND_UPDATE_RESULT_ADAPTER
 import androidx.room.processor.ProcessorErrors.UPDATE_MISSING_PARAMS
-import androidx.room.vo.UpdateMethod
+import androidx.room.vo.UpdateFunction
 import org.hamcrest.CoreMatchers.`is`
 import org.hamcrest.MatcherAssert.assertThat
 import org.junit.Test
@@ -31,8 +31,8 @@
 
 @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
 @RunWith(JUnit4::class)
-class UpdateMethodProcessorTest :
-    DeleteOrUpdateShortcutMethodProcessorTest<UpdateMethod>(Update::class) {
+class UpdateFunctionProcessorTest :
+    DeleteOrUpdateShortcutFunctionProcessorTest<UpdateFunction>(Update::class) {
     override fun invalidReturnTypeError(): String = CANNOT_FIND_UPDATE_RESULT_ADAPTER
 
     override fun noParamsError(): String = UPDATE_MISSING_PARAMS
@@ -41,8 +41,8 @@
         baseContext: Context,
         containing: XType,
         executableElement: XMethodElement
-    ): UpdateMethod {
-        return UpdateMethodProcessor(baseContext, containing, executableElement).process()
+    ): UpdateFunction {
+        return UpdateFunctionProcessor(baseContext, containing, executableElement).process()
     }
 
     @Test
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/processor/UpsertMethodProcessorTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/processor/UpsertFunctionProcessorTest.kt
similarity index 88%
rename from room/room-compiler/src/test/kotlin/androidx/room/processor/UpsertMethodProcessorTest.kt
rename to room/room-compiler/src/test/kotlin/androidx/room/processor/UpsertFunctionProcessorTest.kt
index 25f9a07..e36bf35 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/processor/UpsertMethodProcessorTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/processor/UpsertFunctionProcessorTest.kt
@@ -23,14 +23,14 @@
 import androidx.room.processor.ProcessorErrors.UPSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_UPSERT
 import androidx.room.processor.ProcessorErrors.UPSERT_MULTI_PARAM_SINGLE_RETURN_MISMATCH
 import androidx.room.processor.ProcessorErrors.UPSERT_SINGLE_PARAM_MULTI_RETURN_MISMATCH
-import androidx.room.vo.UpsertMethod
+import androidx.room.vo.UpsertFunction
 import org.junit.runner.RunWith
 import org.junit.runners.JUnit4
 
 @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
 @RunWith(JUnit4::class)
-class UpsertMethodProcessorTest :
-    InsertOrUpsertShortcutMethodProcessorTest<UpsertMethod>(Upsert::class) {
+class UpsertFunctionProcessorTest :
+    InsertOrUpsertShortcutFunctionProcessorTest<UpsertFunction>(Upsert::class) {
     override fun noParamsError(): String = UPSERT_DOES_NOT_HAVE_ANY_PARAMETERS_TO_UPSERT
 
     override fun missingPrimaryKey(
@@ -55,7 +55,7 @@
         baseContext: Context,
         containing: XType,
         executableElement: XMethodElement
-    ): UpsertMethod {
-        return UpsertMethodProcessor(baseContext, containing, executableElement).process()
+    ): UpsertFunction {
+        return UpsertFunctionProcessor(baseContext, containing, executableElement).process()
     }
 }
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
index bf39ada..19a60fa 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
@@ -61,10 +61,10 @@
 import androidx.room.solver.query.parameter.CollectionQueryParameterAdapter
 import androidx.room.solver.query.result.MultiTypedPagingSourceQueryResultBinder
 import androidx.room.solver.query.result.Paging3PagingSourceQueryResultBinder
-import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureDeleteOrUpdateMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureInsertOrUpsertMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.RxCallableDeleteOrUpdateMethodBinderProvider
-import androidx.room.solver.shortcut.binderprovider.RxCallableInsertOrUpsertMethodBinderProvider
+import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.GuavaListenableFutureInsertOrUpsertFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.RxCallableDeleteOrUpdateFunctionBinderProvider
+import androidx.room.solver.shortcut.binderprovider.RxCallableInsertOrUpsertFunctionBinderProvider
 import androidx.room.solver.types.BoxedPrimitiveColumnTypeAdapter
 import androidx.room.solver.types.ByteBufferColumnTypeAdapter
 import androidx.room.solver.types.ColumnTypeAdapter
@@ -79,7 +79,7 @@
 import androidx.room.solver.types.ValueClassConverterWrapper
 import androidx.room.testing.context
 import androidx.room.vo.BuiltInConverterFlags
-import androidx.room.vo.ReadQueryMethod
+import androidx.room.vo.ReadQueryFunction
 import org.hamcrest.CoreMatchers.instanceOf
 import org.hamcrest.CoreMatchers.`is`
 import org.hamcrest.CoreMatchers.notNullValue
@@ -880,7 +880,7 @@
                     val single = invocation.processingEnv.requireTypeElement(rxTypeClassName)
                     assertThat(single, notNullValue())
                     assertThat(
-                        RxCallableInsertOrUpsertMethodBinderProvider.getAll(invocation.context)
+                        RxCallableInsertOrUpsertFunctionBinderProvider.getAll(invocation.context)
                             .any { it.matches(single.type) },
                         `is`(true)
                     )
@@ -898,7 +898,7 @@
                 runProcessorTestWithK1(sources = listOf(rxTypeSrc)) { invocation ->
                     val maybe = invocation.processingEnv.requireTypeElement(rxTypeClassName)
                     assertThat(
-                        RxCallableInsertOrUpsertMethodBinderProvider.getAll(invocation.context)
+                        RxCallableInsertOrUpsertFunctionBinderProvider.getAll(invocation.context)
                             .any { it.matches(maybe.type) },
                         `is`(true)
                     )
@@ -916,7 +916,7 @@
                 runProcessorTestWithK1(sources = listOf(rxTypeSrc)) { invocation ->
                     val completable = invocation.processingEnv.requireTypeElement(rxTypeClassName)
                     assertThat(
-                        RxCallableInsertOrUpsertMethodBinderProvider.getAll(invocation.context)
+                        RxCallableInsertOrUpsertFunctionBinderProvider.getAll(invocation.context)
                             .any { it.matches(completable.type) },
                         `is`(true)
                     )
@@ -932,7 +932,7 @@
                     GuavaUtilConcurrentTypeNames.LISTENABLE_FUTURE
                 )
             assertThat(
-                GuavaListenableFutureInsertOrUpsertMethodBinderProvider(invocation.context)
+                GuavaListenableFutureInsertOrUpsertFunctionBinderProvider(invocation.context)
                     .matches(future.type),
                 `is`(true)
             )
@@ -945,7 +945,7 @@
             val single = invocation.processingEnv.requireTypeElement(RxJava2TypeNames.SINGLE)
             assertThat(single, notNullValue())
             assertThat(
-                RxCallableDeleteOrUpdateMethodBinderProvider.getAll(invocation.context).any {
+                RxCallableDeleteOrUpdateFunctionBinderProvider.getAll(invocation.context).any {
                     it.matches(single.type)
                 },
                 `is`(true)
@@ -959,7 +959,7 @@
             val maybe = invocation.processingEnv.requireTypeElement(RxJava2TypeNames.MAYBE)
             assertThat(maybe, notNullValue())
             assertThat(
-                RxCallableDeleteOrUpdateMethodBinderProvider.getAll(invocation.context).any {
+                RxCallableDeleteOrUpdateFunctionBinderProvider.getAll(invocation.context).any {
                     it.matches(maybe.type)
                 },
                 `is`(true)
@@ -974,7 +974,7 @@
                 invocation.processingEnv.requireTypeElement(RxJava2TypeNames.COMPLETABLE)
             assertThat(completable, notNullValue())
             assertThat(
-                RxCallableDeleteOrUpdateMethodBinderProvider.getAll(invocation.context).any {
+                RxCallableDeleteOrUpdateFunctionBinderProvider.getAll(invocation.context).any {
                     it.matches(completable.type)
                 },
                 `is`(true)
@@ -991,7 +991,7 @@
                 )
             assertThat(future, notNullValue())
             assertThat(
-                GuavaListenableFutureDeleteOrUpdateMethodBinderProvider(invocation.context)
+                GuavaListenableFutureDeleteOrUpdateFunctionBinderProvider(invocation.context)
                     .matches(future.type),
                 `is`(true)
             )
@@ -1009,7 +1009,9 @@
                     val single = invocation.processingEnv.requireTypeElement(rxTypeClassName)
                     assertThat(single).isNotNull()
                     assertThat(
-                            RxCallableInsertOrUpsertMethodBinderProvider.getAll(invocation.context)
+                            RxCallableInsertOrUpsertFunctionBinderProvider.getAll(
+                                    invocation.context
+                                )
                                 .any { it.matches(single.type) }
                         )
                         .isTrue()
@@ -1027,7 +1029,9 @@
                 runProcessorTestWithK1(sources = listOf(rxTypeSrc)) { invocation ->
                     val maybe = invocation.processingEnv.requireTypeElement(rxTypeClassName)
                     assertThat(
-                            RxCallableInsertOrUpsertMethodBinderProvider.getAll(invocation.context)
+                            RxCallableInsertOrUpsertFunctionBinderProvider.getAll(
+                                    invocation.context
+                                )
                                 .any { it.matches(maybe.type) }
                         )
                         .isTrue()
@@ -1045,7 +1049,9 @@
                 runProcessorTestWithK1(sources = listOf(rxTypeSrc)) { invocation ->
                     val completable = invocation.processingEnv.requireTypeElement(rxTypeClassName)
                     assertThat(
-                            RxCallableInsertOrUpsertMethodBinderProvider.getAll(invocation.context)
+                            RxCallableInsertOrUpsertFunctionBinderProvider.getAll(
+                                    invocation.context
+                                )
                                 .any { it.matches(completable.type) }
                         )
                         .isTrue()
@@ -1061,7 +1067,7 @@
                     GuavaUtilConcurrentTypeNames.LISTENABLE_FUTURE
                 )
             assertThat(
-                    GuavaListenableFutureInsertOrUpsertMethodBinderProvider(invocation.context)
+                    GuavaListenableFutureInsertOrUpsertFunctionBinderProvider(invocation.context)
                         .matches(future.type)
                 )
                 .isTrue()
@@ -1427,7 +1433,10 @@
                 )
             val parsedDao = parser.process()
             val binder =
-                parsedDao.queryMethods.filterIsInstance<ReadQueryMethod>().first().queryResultBinder
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
+                    .first()
+                    .queryResultBinder
             assertThat(binder is Paging3PagingSourceQueryResultBinder).isTrue()
 
             val pagingSourceXRawType: XRawType? =
@@ -1435,8 +1444,8 @@
                     .findType(PagingTypeNames.PAGING_SOURCE.canonicalName)
                     ?.rawType
             val returnedXRawType =
-                parsedDao.queryMethods
-                    .filterIsInstance<ReadQueryMethod>()
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
                     .first()
                     .returnType
                     .rawType
@@ -1490,7 +1499,10 @@
                 )
             val parsedDao = parser.process()
             val binder =
-                parsedDao.queryMethods.filterIsInstance<ReadQueryMethod>().first().queryResultBinder
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
+                    .first()
+                    .queryResultBinder
 
             // assert that room correctly binds to ListenableFuturePagingSource instead of
             // its supertype PagingSource. ListenableFuturePagingSourceBinderProvider
@@ -1502,8 +1514,8 @@
                     .findType(PagingTypeNames.LISTENABLE_FUTURE_PAGING_SOURCE.canonicalName)
                     ?.rawType
             val returnedXRawType =
-                parsedDao.queryMethods
-                    .filterIsInstance<ReadQueryMethod>()
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
                     .first()
                     .returnType
                     .rawType
@@ -1550,7 +1562,10 @@
                 )
             val parsedDao = parser.process()
             val binder =
-                parsedDao.queryMethods.filterIsInstance<ReadQueryMethod>().first().queryResultBinder
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
+                    .first()
+                    .queryResultBinder
 
             assertThat(binder is MultiTypedPagingSourceQueryResultBinder).isTrue()
             val rxPagingSourceXRawType: XRawType? =
@@ -1558,8 +1573,8 @@
                     .findType(PagingTypeNames.RX2_PAGING_SOURCE.canonicalName)
                     ?.rawType
             val returnedXRawType =
-                parsedDao.queryMethods
-                    .filterIsInstance<ReadQueryMethod>()
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
                     .first()
                     .returnType
                     .rawType
@@ -1606,7 +1621,10 @@
                 )
             val parsedDao = parser.process()
             val binder =
-                parsedDao.queryMethods.filterIsInstance<ReadQueryMethod>().first().queryResultBinder
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
+                    .first()
+                    .queryResultBinder
 
             assertThat(binder is MultiTypedPagingSourceQueryResultBinder).isTrue()
             val rxPagingSourceXRawType: XRawType? =
@@ -1614,8 +1632,8 @@
                     .findType(PagingTypeNames.RX3_PAGING_SOURCE.canonicalName)
                     ?.rawType
             val returnedXRawType =
-                parsedDao.queryMethods
-                    .filterIsInstance<ReadQueryMethod>()
+                parsedDao.queryFunctions
+                    .filterIsInstance<ReadQueryFunction>()
                     .first()
                     .returnType
                     .rawType
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
index ad513ea..23c72a0 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
@@ -25,7 +25,7 @@
 import androidx.room.compiler.processing.util.Source
 import androidx.room.ext.RoomTypeNames.ROOM_SQL_QUERY
 import androidx.room.ext.RoomTypeNames.STRING_UTIL
-import androidx.room.processor.QueryMethodProcessor
+import androidx.room.processor.QueryFunctionProcessor
 import androidx.room.runProcessorTestWithK1
 import androidx.room.testing.context
 import androidx.room.writer.QueryWriter
@@ -375,7 +375,7 @@
                     }
                     .first { it.second.isNotEmpty() }
             val parser =
-                QueryMethodProcessor(
+                QueryFunctionProcessor(
                     baseContext = invocation.context,
                     containing = owner.type,
                     executableElement = methods.first()
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
index 421fb25..a730267 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
@@ -399,7 +399,7 @@
             type = mock(XType::class.java),
             entities = entities,
             views = views,
-            daoMethods = emptyList(),
+            daoFunctions = emptyList(),
             version = -1,
             exportSchema = false,
             enableForeignKeys = false,
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/vo/DatabaseTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/vo/DatabaseTest.kt
index 536bc08..cc50bc3 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/vo/DatabaseTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/vo/DatabaseTest.kt
@@ -67,7 +67,7 @@
                         )
                     ),
                 views = emptyList(),
-                daoMethods = emptyList(),
+                daoFunctions = emptyList(),
                 version = 1,
                 exportSchema = false,
                 enableForeignKeys = false,
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
index 47a2205..c6e6898 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
@@ -1108,7 +1108,7 @@
     }
 
     @Test
-    fun transactionMethodAdapter_interface(
+    fun transactionFunctionAdapter_interface(
         @TestParameter("disable", "all-compatibility", "all") jvmDefaultMode: String
     ) {
         // For parametrized tests, use method name from reflection
@@ -1180,7 +1180,7 @@
     }
 
     @Test
-    fun transactionMethodAdapter_abstractClass() {
+    fun transactionFunctionAdapter_abstractClass() {
         val src =
             Source.kotlin(
                 "MyDao.kt",
@@ -1235,7 +1235,7 @@
     }
 
     @Test
-    fun deleteOrUpdateMethodAdapter() {
+    fun deleteOrUpdateFunctionAdapter() {
         val src =
             Source.kotlin(
                 "MyDao.kt",
@@ -1273,7 +1273,7 @@
     }
 
     @Test
-    fun insertOrUpsertMethodAdapter() {
+    fun insertOrUpsertFunctionAdapter() {
         val src =
             Source.kotlin(
                 "MyDao.kt",
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateFunctionAdapter.kt
similarity index 100%
rename from room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
rename to room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateFunctionAdapter.kt
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertFunctionAdapter.kt
similarity index 100%
rename from room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
rename to room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertFunctionAdapter.kt
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/transactionFunctionAdapter_abstractClass.kt
similarity index 100%
rename from room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
rename to room/room-compiler/src/test/test-data/kotlinCodeGen/transactionFunctionAdapter_abstractClass.kt
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/transactionFunctionAdapter_interface.kt
similarity index 100%
rename from room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
rename to room/room-compiler/src/test/test-data/kotlinCodeGen/transactionFunctionAdapter_interface.kt
