
sirius.kernel.di.ClassLoadAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirius-kernel Show documentation
Show all versions of sirius-kernel Show documentation
Provides common core classes and the microkernel powering all Sirius applications
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package sirius.kernel.di;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.lang.annotation.Annotation;
/**
* Implementations of this class will be automatically detected and applied to
* all matching classes on startup.
*/
public interface ClassLoadAction {
/**
* Returns the trigger-annotation which is used to identify classes of
* interest.
*
* @return a class of an annotation which identifies classes processed by this implementation.
* Returns null to process each class.
*/
@Nullable
Class extends Annotation> getTrigger();
/**
* Invoked for each class which contains the trigger-annotation.
*
* @param ctx the context in which the part should be inserted
* @param clazz the class to process
* @throws Exception if the given class cannot be instantiated or registered as desired
*/
void handle(@Nonnull MutableGlobalContext ctx, @Nonnull Class> clazz) throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy