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

org.jboss.logging.generator.Annotations Maven / Gradle / Ivy

There is a newer version: 1.0.0.CR5
Show newest version
/*
 *  JBoss, Home of Professional Open Source Copyright 2011, Red Hat, Inc., and
 *  individual contributors by the @authors tag. See the copyright.txt in the
 *  distribution for a full listing of individual contributors.
 *
 *  This is free software; you can redistribute it and/or modify it under the
 *  terms of the GNU Lesser General Public License as published by the Free
 *  Software Foundation; either version 2.1 of the License, or (at your option)
 *  any later version.
 *
 *  This software is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 *  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this software; if not, write to the Free Software Foundation,
 *  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
 *  site: http://www.fsf.org.
 */

package org.jboss.logging.generator;

import java.lang.annotation.Annotation;
import java.text.MessageFormat;

/**
 * Defines the annotations and annotation values used to generate the concrete classes from the annotated interfaces.
 *
 * @author James R. Perkins - 19.Feb.2011
 */
public interface Annotations {

    /**
     * A simple annotation to allow an annotation to be ignored.
     */
    public @interface Void {
    }

    /**
     * The message format type.
     */
    public static enum FormatType {

        MESSAGE_FORMAT('v', MessageFormat.class, "format"),
        PRINTF('f', String.class, "format");
        private final char logType;
        private final Class formatClass;
        private final String staticMethod;

        private FormatType(final char logType, final Class formatClass, final String staticMethod) {
            this.logType = logType;
            this.formatClass = formatClass;
            this.staticMethod = staticMethod;
        }

        public char logType() {
            return logType;
        }

        public Class formatClass() {
            return formatClass;
        }

        public String staticMethod() {
            return staticMethod;
        }
    }

    /**
     * Returns the cause annotation class.
     *
     * @return the cause annotation.
     */
    Class cause();

    /**
     * Returns the format with annotation class.
     *
     * @return the format with annotation.
     */
    Class formatWith();

    /**
     * Returns the log message annotation class.
     *
     * @return the log message annotation.
     */
    Class logMessage();

    /**
     * Returns the message annotation class.
     *
     * @return the message annotation.
     */
    Class message();

    /**
     * Returns the message bundle annotation class.
     *
     * @return the message bundle annotation.
     */
    Class messageBundle();

    /**
     * Returns the message logger annotation class.
     *
     * @return the message logger annotation.
     */
    Class messageLogger();

    /**
     * Returns the parameter annotation class.
     *
     * @return the parameter annotation.
     */
    Class param();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy