diff --git a/src/main/java/mate.academy/lib/Component.java b/src/main/java/mate.academy/lib/Component.java index 76fb98e9..0cf5e1cf 100644 --- a/src/main/java/mate.academy/lib/Component.java +++ b/src/main/java/mate.academy/lib/Component.java @@ -1,9 +1,12 @@ package mate.academy.lib; +import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) public @interface Component { } diff --git a/src/main/java/mate.academy/lib/Inject.java b/src/main/java/mate.academy/lib/Inject.java index 32775efe..ad841167 100644 --- a/src/main/java/mate.academy/lib/Inject.java +++ b/src/main/java/mate.academy/lib/Inject.java @@ -1,9 +1,12 @@ package mate.academy.lib; +import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) public @interface Inject { }