All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jaxrs.examples.client.validator.Pattern Maven / Gradle / Ivy

/*
 * Copyright (c) 2011, 2017 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0, which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

package jaxrs.examples.client.validator;

import jakarta.enterprise.util.AnnotationLiteral;
import jakarta.validation.Payload;

/**
 * @author sp106478
 */
public class Pattern extends AnnotationLiteral
        implements jakarta.validation.constraints.Pattern {
    private static final long serialVersionUID = 920895043686145958L;

    private String regexp;

    public Pattern(String regexp) {
        this.regexp = regexp;
    }

    @Override
    public String message() {
        return "{jakarta.validation.constraints.Pattern.message}";
    }

    @Override
    public Class[] groups() {
        return new Class[0];
    }

    @Override
    public Class[] payload() {
        return (Class[]) new Class[0];
    }

    @Override
    public String regexp() {
        return regexp;
    }

    @Override
    public Flag[] flags() {
        return new Flag[0];
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy