Package me.gilbva.shrike.navigation
Interface ClassRepository
public interface ClassRepository
Represents the collection of classes being used by
IocContext to
create and manage components.- Author:
- Gilberto Vento
-
Method Summary
Modifier and Type Method Description <A extends java.lang.annotation.Annotation, T>
voidforEachClass(java.lang.Class<A> annotation, java.lang.Class<T> service, ClassNavigator<A,T> navigator)Navigates through all component classes registered in this repository, that are annotated with the given annotation.<A extends java.lang.annotation.Annotation>
voidforEachClass(java.lang.Class<A> annotation, ClassNavigator<A,java.lang.Object> navigator)Navigates through all component classes registered in this repository, that are annotated with the given annotation.<A extends java.lang.annotation.Annotation>
voidforEachField(java.lang.Class<A> annotation, FieldNavigator<A> navigator)Navigates through all fields of all component classes registered in this repository, that are annotated with the given annotation.<A extends java.lang.annotation.Annotation>
voidforEachMethod(java.lang.Class<A> annotation, MethodNavigator<A> navigator)Navigates through all methods of all component classes registered in this repository, that are annotated with the given annotation.
-
Method Details
-
forEachMethod
<A extends java.lang.annotation.Annotation> void forEachMethod(java.lang.Class<A> annotation, MethodNavigator<A> navigator)Navigates through all methods of all component classes registered in this repository, that are annotated with the given annotation. This includes superclasses methods.- Type Parameters:
A- The type of the annotation methods must be annotated with.- Parameters:
annotation- The class of the annotation methods must be annotated with.navigator- Callback functional interface that handles the annotated method.
-
forEachField
<A extends java.lang.annotation.Annotation> void forEachField(java.lang.Class<A> annotation, FieldNavigator<A> navigator)Navigates through all fields of all component classes registered in this repository, that are annotated with the given annotation. This includes superclasses fields.- Type Parameters:
A- The type of the annotation fields must be annotated with.- Parameters:
annotation- The class of the annotation fields must be annotated with.navigator- Callback functional interface that handles the annotated field.
-
forEachClass
<A extends java.lang.annotation.Annotation> void forEachClass(java.lang.Class<A> annotation, ClassNavigator<A,java.lang.Object> navigator)Navigates through all component classes registered in this repository, that are annotated with the given annotation. This includes superclasses fields.- Type Parameters:
A- The type of the annotation classes must be annotated with.- Parameters:
annotation- The class of the annotation classes must be annotated with.navigator- Callback functional interface that handles the annotated class.
-
forEachClass
<A extends java.lang.annotation.Annotation, T> void forEachClass(java.lang.Class<A> annotation, java.lang.Class<T> service, ClassNavigator<A,T> navigator)Navigates through all component classes registered in this repository, that are annotated with the given annotation. This includes superclasses fields.- Type Parameters:
A- The type of the annotation classes must be annotated with.T- The type of the class the component must extends from.- Parameters:
annotation- The class of the annotation classes must be annotated with.service- The class the component must extends from.navigator- Callback functional interface that handles the annotated class.
-