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

com.github.jeuxjeux20.relativesorting.Order Maven / Gradle / Ivy

There is a newer version: 0.1.1
Show newest version
package com.github.jeuxjeux20.relativesorting;

import com.github.jeuxjeux20.relativesorting.config.DefaultPositionProvider;

import java.lang.annotation.*;

/**
 * Specifies the relative constraints on the position of elements
 * using this class as an identifier.
 */
@Inherited
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Order {
    /**
     * Returns the classes that this element should precede.
     *
     * @return the classes that this element should precede
     */
    Class[] before() default {};

    /**
     * Returns the classes that this element should succeed.
     *
     * @return the classes that this element should succeed
     */
    Class[] after() default {};

    /**
     * Defines the position of the element when its
     * exact position cannot be determined.
     * 

* A higher value will put this element further in the list, * while a lower value will put it closer. *

* Note that a value of 0 is considered default and will get processed by * a {@link DefaultPositionProvider}. * * @return the position of the element */ int position() default 0; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy