com.memority.toolkit.rule.api.LibDependencies Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of toolkit-rule-api Show documentation
Show all versions of toolkit-rule-api Show documentation
This artifact provides the API classes that are necessary to implement the contracts of Memority configuration Rules.
/*
* Copyright (c) 2016-2023 Memority. All Rights Reserved.
*
* This file is part of Memority Toolkit API , a Memority project.
*
* This file is released under the Memority Public Artifacts End-User License Agreement,
* see
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
package com.memority.toolkit.rule.api;
import com.memority.toolkit.rule.api.api.Libs;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Rule class annotation expressing direct dependencies on {@link LibraryRule Library Rules}. It is intended for internal
* usage of the {@link Libs} implementation provider (dependency tracking, cache eviction, ...) and should be positioned
* at compile time using an AST Transformation.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface LibDependencies {
/**
* @return all Lib dependencies
*/
LibDependency[] value();
/**
* Expresses a single dependency
*/
@interface LibDependency {
/**
* @return the Library unique identifier. This is an opaque string whose interpretation is internal to the {@link Libs}
* implementation provider (typically a config entity id).
*/
String name();
/**
* @return the {@link RuleCategory}
*/
String category();
/**
* @return the Lib script class fqn. We cannot use the class directly as groovy classes are loaded by the groovy class
* loader: the system class loader cannot resolve them.
*/
String clazz();
}
}