code: public Optional<String> getPattern() {
          if (property instanceof StringProperty) {
              StringProperty stringProperty = (StringProperty) property;
              return Optional.ofNullable(stringProperty.getPattern());
          } else if (property instanceof UUIDProperty) {
              UUIDProperty uuidProperty = (UUIDProperty) property;
              return Optional.ofNullable(uuidProperty.getPattern());
          }
          return Optional.empty();
      }
docs: Retrieves the pattern of a property
  
  @return the pattern of the property