class ResourceProcessor
Scans R files and and compiles resource values in those R classes. This allows us to look up raw resource values (eg 23523452) and convert that to the resource name (eg R.layout.my_view) so that we can properly reference that resource. This is important in library projects where the R value at process time can be different from the final R value in the app.
This is adapted from Butterknife. https://github.com/JakeWharton/butterknife/pull/613
val rClassNames: List<ClassName> |
|
val trees: Trees? |
fun getAlternateLayouts(layout: ResourceValue): List<ResourceValue>
Returns a list of layout resources whose name contains the given layout as a prefix. |
|
fun getLayoutInAnnotation(element: Element, annotationClass: Class<out Annotation>): ResourceValue |
|
fun getLayoutsInAnnotation(element: Element, annotationClass: Class<out Annotation>): List<ResourceValue>
Get detailed information about the layout resources that are parameters to the given annotation. |
|
fun getResourceInAnnotation(element: Element, annotationClass: Class<*>, resourceType: String?, resourceValue: Int): ResourceValue |
|
fun getResourcesInAnnotation(element: Element, annotationClass: Class<*>, resourceType: String?, resourceValues: List<Int>): List<ResourceValue> |
|
fun getStringResourceInAnnotation(element: Element, annotationClass: Class<*>, resourceValue: Int): ResourceValue |
fun Any.mutex(): Mutex |