public boolean isOptional() {
      final List<String> names =
          Arrays.asList(
              "java.util.Optional",
              "java.util.OptionalInt",
              "java.util.OptionalDouble",
              "java.util.OptionalLong",
              Optional.class.getName(),
              "io.atlassian.fugue.Option");

      for (String name : names) {
        final Element element = elements.getTypeElement(name);
        if (element != null && isSubtypeOf(element)) {
          return true;
        }
      }

      return false;
    }
Creates several matchers programmatically based on {@link ValueAttribute}.
{@code StringMatcher}, {@code WithMatcher}, {@code NotMatcher} etc.
value-processor/src/org/immutables/value/processor/meta/CriteriaModel.java