Showing 1 of 3 files from the diff.

@@ -166,6 +166,22 @@
Loading
166 166
    }
167 167
  }
168 168
169 +
  /**
170 +
   * Create a Flaggable of Java Enum.
171 +
   * @param clazz The [[java.lang.Enum]] class.
172 +
   * @note [[java.lang.Enum]] enumeration constant value look up is case insensitive.
173 +
   */
174 +
  def ofJavaEnum[T <: Enum[T]](clazz: Class[T]): Flaggable[T] =
175 +
    mandatory { s: String =>
176 +
      clazz.getEnumConstants.find(_.name.equalsIgnoreCase(s)) match {
177 +
        case Some(prop) => prop
178 +
        case _ =>
179 +
          throw new IllegalArgumentException(
180 +
            s"The property $s does not belong to Java Enum ${clazz.getName}, the constants defined " +
181 +
              s"in the class are: ${clazz.getEnumConstants.toSeq}.")
182 +
      }
183 +
    }
184 +
169 185
  private[app] class SetFlaggable[T: Flaggable] extends Flaggable[Set[T]] {
170 186
    private val flag = implicitly[Flaggable[T]]
171 187
    assert(flag.default.isEmpty)
Files Coverage
util-app-lifecycle/src/main/scala/com/twitter/app/lifecycle 100.00%
util-app/src/main/scala/com/twitter/app 88.65%
util-benchmark/src/main/scala/com/twitter 0.00%
util-cache/src/main/scala 90.32%
util-core 46.70%
util-hashing/src/main/scala/com/twitter/hashing 85.38%
util-jvm/src/main/scala/com/twitter/jvm 18.29%
util-lint/src/main/scala/com/twitter/util/lint 100.00%
util-logging/src/main/scala/com/twitter/logging 72.62%
util-registry/src/main/scala/com/twitter/util/registry 94.03%
util-routing/src/main/scala/com/twitter/util/routing 86.67%
util-security/src/main/scala/com/twitter/util/security 95.35%
util-slf4j-api/src/main/scala/com/twitter/util/logging 57.55%
util-stats/src/main/scala/com/twitter/finagle/stats 65.16%
util-test/src/main/scala 5.81%
util-thrift/src/main/scala/com/twitter/util 90.00%
util-tunable/src/main/scala/com/twitter/util/tunable 77.63%
util-zk/src/main/scala 40.34%
util-cache-guava/src/main/scala/com/twitter/cache/guava/GuavaCache.scala 100.00%
util-codec/src/main/scala/com/twitter/util/StringEncoder.scala 100.00%
util-reflect/src/main/scala/com/twitter/util/reflect/Proxy.scala 78.13%
...jul-bridge/src/main/scala/com/twitter/util/logging/Slf4jBridgeUtility.scala 0.00%
util-zk-test/src/main/scala/com/twitter/zk/ServerCnxnFactory.scala 76.47%
Project Totals (242 files) 46.18%
1388.5
openjdk11=
TRAVIS_OS_NAME=linux
1388.2
TRAVIS_OS_NAME=linux
openjdk8=

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading