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

org.rx.annotation.ErrorCode Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.rx.annotation;

import java.lang.annotation.*;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;

@Target({METHOD, FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Repeatable(ErrorCode.ErrorCodes.class)
public @interface ErrorCode {
    @Target({METHOD, FIELD})
    @Retention(RetentionPolicy.RUNTIME)
    @Documented
    @interface ErrorCodes {
        ErrorCode[] value();
    }

    enum MessageFormatter {
        StringFormat,
        MessageFormat
    }

    String value() default "";

    Class cause() default Exception.class;

    MessageFormatter messageFormatter() default MessageFormatter.MessageFormat;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy