All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.airbnb.paris.processor.WithParisProcessor.kt Maven / Gradle / Ivy

package com.airbnb.paris.processor

import com.airbnb.paris.processor.android_resource_scanner.AndroidResourceId
import com.airbnb.paris.processor.framework.WithSkyProcessor
import javax.lang.model.element.Element

internal interface WithParisProcessor : WithSkyProcessor {

    override val processor: ParisProcessor

    val RElement get() = processor.rFinder.element

    val defaultStyleNameFormat get() = processor.defaultStyleNameFormat

    fun getResourceId(annotation: Class, element: Element, value: Int): AndroidResourceId? {
        val resourceId = processor.resourceScanner.getId(annotation, element, value)
        if (resourceId == null) {
            logError(element) {
                "Could not retrieve Android resource ID from annotation."
            }
        }
        return resourceId
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy