java.lang.Object
java.lang.Enum<GuavaLibrary>
org.inferred.freebuilder.processor.source.feature.GuavaLibrary
All Implemented Interfaces:
Serializable, Comparable<GuavaLibrary>, java.lang.constant.Constable, Feature<GuavaLibrary>

public enum GuavaLibrary extends Enum<GuavaLibrary> implements Feature<GuavaLibrary>
Whether the Guava library is available or not. Defaults to UNAVAILABLE in tests.
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • GuavaLibrary

      private GuavaLibrary(String humanReadableFormat)
  • Method Details

    • values

      public static GuavaLibrary[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static GuavaLibrary valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isAvailable

      public boolean isAvailable()
    • primitiveUtils

      private static Class<?> primitiveUtils(TypeMirror elementType)
    • arrayUtils

      public Optional<Class<?>> arrayUtils(TypeMirror elementType)
      Returns a type with an asList method suitable for an array of elementType elements, if one exists.

      For non-primitive element types, this is just Arrays. For primitive element types, it will be one of the Guava utility classes like Ints, if Guava is available.

    • toString

      public String toString()
      Overrides:
      toString in class Enum<GuavaLibrary>