• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.android.codegen
2 
3 import com.github.javaparser.ast.body.FieldDeclaration
4 
5 /**
6  * `@IntDef` or `@StringDef`
7  */
8 data class ConstDef(val type: Type, val AnnotationName: String, val values: List<FieldDeclaration>) {
9 
10     enum class Type {
11         INT, INT_FLAGS, STRING;
12 
13         val isInt get() = this == INT || this == INT_FLAGS
14     }
15 
<lambda>null16     val CONST_NAMES get() = values.flatMap { it.variables }.map { it.nameAsString }
17 }