3

私は1つの抽象クラスを持っています:

public abstract class AbstractItem

およびいくつかの具象クラス:

public class ConcreteItem1 extends AbstractItem
public class ConcreteItem2 extends AbstractItem
public class ConcreteItem3 extends AbstractItem

また、カスタム注釈があります:

@Target(value = ElementType.TYPE)
@Retention(value = RetentionPolicy.RUNTIME)
public @interface MyAnnotation

ConcreteItems に MyAnnotation を使用させるにはどうすればよいですか? AbstractItem-Class で何らかの形で定義できますか?

4

0 に答える 0