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

top.hendrixshen.magiclib.dependency.api.annotation.Dependencies Maven / Gradle / Ivy

There is a newer version: 0.7.398+fe2125a-beta
Show newest version
package top.hendrixshen.magiclib.dependency.api.annotation;

import top.hendrixshen.magiclib.dependency.api.Predicate;
import top.hendrixshen.magiclib.dependency.impl.MixinDependencyPredicates;

import java.lang.annotation.Retention;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * The main decorator for dependency checking, the classes decorated with this
 * annotation will perform these dependencies in our MixinPlugin.
 */
@Retention(RUNTIME)
public @interface Dependencies {
    /**
     * Logic and.
     * 

* The dependencies located in this list are logical and. * * @return Dependencies list. */ Dependency[] and() default {}; /** * Logic or. *

* The dependencies located in this list are logical or. * * @return Dependencies list. */ Dependency[] or() default {}; /** * Logic not. *

* The dependencies located in this list are logical not. * * @return Dependencies list. */ Dependency[] not() default {}; /** * Dependency custom predicate. * * @return Custom Predicate Classes. */ Class> predicate() default DefaultPredicate.class; class DefaultPredicate implements Predicate { @Override public boolean isSatisfied(Object obj) { return true; } } }