ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [Java] Annotation, Meta data๋ž€?
    Android/Java 2021. 2. 19. 18:27
    ๋ฐ˜์‘ํ˜•
    • ์ด ๊ธ€์€ "์ž๋ฐ” ์˜จ๋ผ์ธ ์Šคํ„ฐ๋””"๋ฅผ ํ†ตํ•ด ๊ณต๋ถ€ํ•œ ๋‚ด์šฉ์„ ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค.

    Annotation์ด๋ž€?

    • Anntation์€ JDK 1.5๋ถ€ํ„ฐ ๋„์ž…๋œ ๊ฒƒ์œผ๋กœ ์ž๋ฐ” ์†Œ์Šค ์ฝ”๋“œ์— ์ถ”๊ฐ€ํ•˜์—ฌ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์˜ ์ผ์ข…์ž…๋‹ˆ๋‹ค.

    • ๋Œ€๋ถ€๋ถ„์ด ๋งŽ์ด ๋ดค์„ ๋งŒํ•œ @Override, @Deprecated ๊ฐ€ Annotation ์˜ˆ๋กœ Annotation์˜ ๊ตฌํ˜„๋œ ์ •๋ณด์— ๋”ฐ๋ผ ์—ฐ๊ฒฐ๋˜๋Š” ๋ฐฉํ–ฅ์ด ๊ฒฐ์ •๋ฉ๋‹ˆ๋‹ค.

    • ์ฆ‰, ์ „์ฒด์ ์ธ ์†Œ์Šค์ฝ”๋“œ์˜ ๋กœ์ง์„ ๋ฐ”๊พธ์ง„ ์•Š์ง€๋งŒ Annotation์˜ ํƒ€๊ฒŸ์„ ์—ฐ๊ฒฐ ๋ฐฉ๋ฒ•์ด๋‚˜ ์†Œ์Šค์ฝ”๋“œ์˜ ๊ตฌ์กฐ๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Annotation์˜ ๊ธฐ๋Šฅ์„ ์ž˜ ํ™œ์šฉํ•œ๋‹ค๋ฉด ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง๊ณผ ๋ณ„๋„์˜ ์‹œ์Šคํ…œ ์„ค์ •์€ Annotation์—๊ฒŒ ์œ„์ž„ํ•จ์œผ๋กœ์จ ๊ฐœ๋ฐœ์ž๋“ค์€ ๋กœ์ง ๊ตฌํ˜„์—๋งŒ ์ง‘์ค‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ Annotation์„ ํ†ตํ•ด AOP(Aspect Object Programming)์„ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    • ์ฐธ์กฐ(https://www.nextree.co.kr/p5864/)


    Annotation์˜ ํŠน์ง•

    • ์ž๋ฐ” Annotation๋Š” ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์˜ ์ผ์ข…์œผ๋กœ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ž€ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ์ฒ˜๋ฆฌํ•ด์•ผ ํ•  ๋ฐ์ดํ„ฐ๊ฐ€ ์•„๋‹ˆ๋ผ, ์ปดํŒŒ์ผ ํƒ€์ž„๊ณผ ๋Ÿฐํƒ€์ž„์—์„œ ์ฝ”๋“œ๋ฅผ ์–ด๋–ป๊ฒŒ ์ปดํŒŒ์ผํ•˜๊ณ  ์ฒ˜๋ฆฌํ•  ๊ฒƒ์ธ์ง€ ์•Œ๋ ค์ฃผ๋Š” ์ •๋ณด์ž…๋‹ˆ๋‹ค.

    • ์ปดํŒŒ์ผ๋Ÿฌ์—๊ฒŒ ์ฝ”๋“œ ๋ฌธ๋ฒ• ์—๋Ÿฌ๋ฅผ ์ฒดํฌํ•˜๋„๋ก ์ •๋ณด๋ฅผ ์ œ๊ณตํ•œ๋‹ค๊ฑฐ๋‚˜, ๋Ÿฐํƒ€์ž„ ๋•Œ ํŠน์ • ๊ธฐ๋Šฅ์„ ์‹คํ–‰ํ•˜๋„๋ก ์ •๋ณด๋ฅผ ์ œ๊ณตํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


    Built-in Annotation

    • @Override : ์˜ค๋ฒ„๋ผ์ด๋”ฉ ๋ฉ”์†Œ๋“œ์ž„์„ ๋‚˜ํƒ€๋‚ด๊ณ  ์ƒ์†๋œ ๋ฉ”์†Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜, ๋ฉ”์†Œ๋“œ์˜ ํ–‰๋™์„ ๋Œ€์ฒดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋งŒ์•ฝ ๋ถ€๋ชจ ํด๋ž˜์Šค ๋˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค์—์„œ ํ•ด๋‹น ๋ฉ”์†Œ๋“œ๊ฐ€ ์—†๋‹ค๋ฉด ์ปดํŒŒ์ผ ์˜ค๋ฅ˜๋ฅผ ๋‚ฉ๋‹ˆ๋‹ค.

    • @SuppressWarnings : ๋‹ค์Œ ์–ด๋…ธํ…Œ์ด์…˜์ด ์žˆ๋Š” ์ฝ”๋“œ์—์„œ๋Š” ์ปดํŒŒ์ผ ๊ฒฝ๊ณ ๋ฅผ ๋ฌด์‹œํ•˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

    • @Deprecated : ๋” ์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๋ฉ”์†Œ๋“œ๋ฅผ ๋œปํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ž˜๋„ ๋ฉ”์†Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ ์ปดํŒŒ์ผ ๊ฒฝ๋กœ๋ฅผ ๋ฐœ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค.

    • @SafeVarargs : ๊ฐ€๋ณ€์ธ์ž ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ๊ฒฝ๊ณ ๋ฅผ ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค.

    • @FunctionalInterface : ๋ฉ”์†Œ๋“œ๊ฐ€ ํ•˜๋‚˜๋งŒ ์กด์žฌํ•˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค๋กœ ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ์˜ ๋žŒ๋‹ค ํ•จ์ˆ˜๋ฅผ ์œ„ํ•œ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. ๋ฉ”์†Œ๋“œ๊ฐ€ ํ•˜๋‚˜๊ฐ€ ์•„๋‹ ๊ฒฝ์šฐ์—๋Š” ์ปดํŒŒ์ผ ์˜ค๋ฅ˜๊ฐ€ ๋‚ฉ๋‹ˆ๋‹ค.

    • @Native : ๋„ค์ดํ‹ฐ๋ธŒ ์ฝ”๋“œ์—์„œ ์ฐธ์กฐํ•  ์ˆ˜ ์žˆ๋Š” ์ƒ์ˆ˜๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.


    Meta Annotation

    Annotation์„ ์ง์ ‘ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•์„ ํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ์ด๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Meta Annotation์„ ์•Œ์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค.

    @Target
    Annotaion์˜ ์ ์šฉ ๋ฒ”์œ„๋Š” Target์— ๋”ฐ๋ผ ๋‹ฌ๋ผ์ง€๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์˜ค์ง ๋ฉ”์†Œ๋“œ์—์„œ ์‚ฌ์šฉ๋  ์ˆ˜๋„ ์žˆ๊ณ  ์ƒ์„ฑ์ž ๋ฐ ํ•„๋“œ ์„ ์–ธ์— ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Target annotation ์ข…๋ฅ˜๋Š” 8๊ฐœ ์žˆ์Šต๋‹ˆ๋‹ค.

    @Documented
    @Retention(RetentionPolicy.RUNTIME)
    @Target({ElementType.CONSTRUCTOR, ElementType.METHOD})
    public @interface SafeVarargs {
    }

    @Retention

    Retention annotation์„ ์‚ฌ์šฉํ•˜์—ฌ ํ”„๋กœ๊ทธ๋žจ lifecycle์—์„œ annotation์ด ์ ์šฉ๋˜๋Š” ์œ„์น˜๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
    3๊ฐ€์ง€ ์ •์ฑ…์ด ์กด์žฌํ•˜๊ณ  ๊ฐ ๊ตฌ์„ฑ์— ๋Œ€ํ•œ ์ดํ•ด๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

    • RetentionPolicy.SOURCE : ์ปดํŒŒ์ผ ์ดํ›„ ์ปดํŒŒ์ผ๋Ÿฌ์— ์˜ํ•ด ์‚ญ์ œ๋ฉ๋‹ˆ๋‹ค.
    • RetentionPolicy.CLASS : ์ปดํŒŒ์ผ๋Ÿฌ์— ์˜ํ•ด ํด๋ž˜์Šค ํŒŒ์ผ์— ๊ธฐ๋ก๋˜์ง€๋งŒ ๋Ÿฐํƒ€์ž„๊นŒ์ง€ ์œ ์ง€๋˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋ฆฌํ”Œ๋ ‰์…˜์„ ์ด์šฉํ•˜์—ฌ ์–ด๋…ธํ…Œ์ด์…˜์˜ ์ •๋ณด๋ฅผ ์–ป์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
    • RetentionPolicy.Runtime : ํด๋ž˜์Šค ํŒŒ์ผ์—๋„ ์–ด๋…ธํ…Œ์ด์…˜ ์ •๋ณด๊ฐ€ ๊ธฐ๋ก๋˜๊ณ  ๋Ÿฐํƒ€์ž„ ์‹œ์— ๋ฆฌํ”Œ๋ ‰์…˜์„ ์ด์šฉํ•ด์„œ ์–ด๋…ธํ…Œ์ด์…˜ ์ •๋ณด๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • ์ฐธ์กฐ(https://nesoy.github.io/articles/2018-04/Java-Annotation)

    @Documented

    ๋ฌธ์„œ์— ์–ด๋…ธํ…Œ์ด์…˜ ์ •๋ณด๊ฐ€ ํ‘œ๊ธฐ๋ฉ๋‹ˆ๋‹ค.

    @Inherited

    ์ž์‹ ํด๋ž˜์Šค๊ฐ€ ์–ด๋…ธํ…Œ์ด์…˜์„ ์ƒ์†๋ฐ›๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

    @Repeatable
    java8๋ถ€ํ„ฐ ์ง€์›ํ•˜๋ฉฐ, ๋™์ผํ•œ ์„ ์–ธ์— annotation์„ ๋‘๋ฒˆ ์ด์ƒ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

    @Inherited // ์ƒ์†
    @Documented // ๋ฌธ์„œํ™”
    @Retention(RetentionPolicy.RUNTIME)     // ๋Ÿฐํƒ€์ž„๊นŒ์ง€ ์œ ์ง€
    @Target({
            ElementType.PACKAGE,        // ํŒจํ‚ค์ง€ ์„ ์–ธ ์‹œ
            ElementType.TYPE,       // ํƒ€์ž… ์„ ์–ธ ์‹œ
            ElementType.CONSTRUCTOR,        // ์ƒ์„ฑ์ž ์„ ์–ธ ์‹œ
            ElementType.FIELD,      // ํด๋ž˜์Šค ๋ฉค๋ฒ„๋ณ€์ˆ˜ ์„ ์–ธ ์‹œ
            ElementType.METHOD,     // ๋ฉ”์†Œ๋“œ ์„ ์–ธ ์‹œ
            ElementType.ANNOTATION_TYPE,        // ์–ด๋…ธํ…Œ์ด์…˜ ํƒ€์ž… ์„ ์–ธ ์‹œ
            ElementType.LOCAL_VARIABLE,     // ์ง€์—ญ๋ณ€์ˆ˜ ์„ ์–ธ ์‹œ
            ElementType.PARAMETER,      // ๋งค๊ฐœ๋ณ€์ˆ˜ ์„ ์–ธ ์‹œ
            ElementType.TYPE_PARAMETER,     // ๋งค๊ฐœ๋ณ€์ˆ˜ ํƒ€์ž… ์„ ์–ธ ์‹œ
            ElementType.TYPE_USE        // ํƒ€์ž… ์‚ฌ์šฉ ์‹œ
    })
    public @interface TodayAnnotation {
        public enum DAY{
            MON, TUE, WED,TUR,FRI,SAT,SUN
        }
    
        String today() default "SUN";
        int count() default 7;
        DAY getday() default DAY.SUN;
    }

    Custom Annotation

    @Inherited // ์ƒ์†
    @Documented // ๋ฌธ์„œํ™”
    @Retention(RetentionPolicy.RUNTIME)     // ๋Ÿฐํƒ€์ž„๊นŒ์ง€ ์œ ์ง€
    @Target({ 
            ElementType.FIELD     // ๋ฉ”์†Œ๋“œ ์„ ์–ธ ์‹œ
    })
    public @interface TodayAnnotation {
        public enum DAY{
            MON, TUE, WED,TUR,FRI,SAT,SUN
        }
    
        String today() default "SUN";
        int count() default 7;
        DAY getday() default DAY.SUN;
    }

    ๋‹ค์Œ๊ณผ ๊ฐ™์ด Meta Annotation์„ ์ •์˜ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ๋ฉ”ํƒ€ ์–ด๋…ธํ…Œ์ด์…˜์€ ํด๋ž˜์Šค ํŒŒ์ผ๊ณผ ๋”๋ถˆ์–ด ๋Ÿฐํƒ€์ž„๊นŒ์ง€ ์œ ์ง€๋˜๋ฉฐ, ๋ฉ”์†Œ๋“œ ์„ ์–ธ ์‹œ์—๋งŒ ์–ด๋…ธํ…Œ์ด์…˜์ด ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.

    public class AnnoExample {
        @TodayAnnotation(today = "MON")
        private String strToday;
    
        @TodayAnnotation(count = 6)
        private int count;
    
        @TodayAnnotation(getday = TodayAnnotation.DAY.FRI)
        private Enum enumToday;
    
        void printAnnotation(){
            System.out.println("TodayAnnotation");
        }
    
        public String getStrToday() {
            return strToday;
        }
    
        public int getCount() {
            return count;
        }
    
        public Enum getEnumToday() {
            return enumToday;
        }
    }

    ์–ด๋…ธํ…Œ์ด์…˜์„ Target์— ๋งž๊ฒŒ ์ง€์ •ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. Annotation Target์„ Field๋กœ ์ •์˜ํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฉค๋ฒ„ ๋ณ€์ˆ˜์—๋งŒ ์–ด๋…ธํ…Œ์ด์…˜์ด ์ง€์ •๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    public class InvokeAnnotation {
        public InvokeAnnotation() {
        }
    
        private  <T> T invokeAnnotation(T instance) throws IllegalAccessException{
            Field[] fields = instance.getClass().getDeclaredFields();
    
            for(Field field : fields){
               TodayAnnotation anno = field.getAnnotation(TodayAnnotation.class);
               if(anno != null){
                   System.out.println(anno.today());
                   System.out.println(anno.count());
                   System.out.println(anno.getday());
               }
                System.out.println();
            }
            return instance;
        }
    
        public <T> T get(Class clazz) throws IllegalAccessException, InstantiationException{
            T instance = (T) clazz.newInstance();
            instance = invokeAnnotation(instance);
            return instance;
        }
    }
    public class Main {
        public static void main(String[] args) throws InstantiationException,IllegalAccessException{
            InvokeAnnotation demo = new InvokeAnnotation();
            AnnoExample anno = demo.get(AnnoExample.class);
            anno.printAnnotation();
        }
    }

    ์ž๋ฐ”์—์„œ๋Š” ๋ฆฌํ”Œ๋ ‰์…˜์ด๋ผ๋Š” ์œ ์šฉํ•œ ๊ธฐ๋Šฅ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฆฌํ”Œ๋ ‰์…˜์ด๋ž€ ๊ตฌ์ฒด์ ์ธ ํด๋ž˜์Šค ํƒ€์ž…์„ ์•Œ๊ธฐ ๋ชปํ•˜๋”๋ผ๋„, ํด๋ž˜์Šค์˜ ๋ฉ”์†Œ๋“œ, ํƒ€์ž…, ๋ณ€์ˆ˜๋“ค์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ์ž๋ฐ” API ์ž…๋‹ˆ๋‹ค. ์œ„์— ์žˆ๋Š” ์ฝ”๋“œ๋Š” Custom Annotation์„ ์‚ฌ์šฉํ•œ ํด๋ž˜์Šค(AnnoExample)๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ํ™•์ธํ•˜๋Š” ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค. invokeAnnotation ๋ฉ”์†Œ๋“œ์—์„œ๋Š” ์ œ๋„ˆ๋ฆญ์œผ๋กœ ์ฝ”๋“œ๊ฐ€ ๊ตฌํ˜„๋˜์–ด ์žˆ์–ด ๊ตฌ์ฒด์ ์ธ ํด๋ž˜์Šค ํƒ€์ž…์„ ์•Œ์ง€ ๋ชปํ•˜์ง€๋งŒ ๋ฆฌํ”Œ๋ ‰์…˜์„ ์ด์šฉํ•˜์—ฌ ๋ฉค๋ฒ„ ๋ณ€์ˆ˜๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๋ฉ”์†Œ๋“œ๋ฅผ ์‹คํ–‰ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

    ์—ฌ๊ธฐ์„œ Retentation์œผ๋กœ ์ธํ•ด ๊ฒฐ๊ณผ๊ฐ’์ด ๋‹ฌ๋ผ์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. TodayAnnotation์„ ์–ป๊ธฐ ์œ„ํ•ด getAnnotation ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•˜์˜€์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ TodayAnnotation์˜ Retentation์€ RUNTIME์œผ๋กœ ์ง€์ •๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฆฌํ”Œ๋ ‰์…˜์„ ์ด์šฉํ•˜์—ฌ ์–ด๋…ธํ…Œ์ด์…˜ ์ •๋ณด๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ๊ทธ ๋ฐ–์˜ CLASS, SOURCE๋กœ ์ง€์ • ์‹œ ๋Ÿฐํƒ€์ž„ ์‹œ์—๋Š” ์–ด๋…ธํ…Œ์ด์…˜ ์ •๋ณด๋ฅผ ์–ป์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.


    Annotation Processor

    Annotation Process๋Š” ์ž๋ฐ” ์ปดํŒŒ์ผ๋Ÿฌ ํ”Œ๋Ÿฌ๊ทธ์ธ์˜ ์ผ์ข…์œผ๋กœ, ์–ด๋…ธํ…Œ์ด์…˜์— ๋Œ€ํ•œ ์ฝ”๋“œ๋ฒ ์ด์Šค๋ฅผ ๊ฒ€์‚ฌ, ์ˆ˜์ •, ์ƒ์„ฑํ•˜๋Š” ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค.
    ์–ด๋…ธํ…Œ์ด์…˜ ์ฒ˜๋ฆฌ ๋™์ž‘์€ ์—ฌ๋Ÿฌ ๊ณผ์ •์„ ๊ฑฐ์ณ์„œ ์ˆ˜ํ–‰๋ฉ๋‹.

    • ์ž๋ฐ” ์ปดํŒŒ์ผ๋Ÿฌ๋Š” ์–ด๋…ธํ…Œ์ด์…˜ ํ”„๋กœ์„ธ์„œ์— ๋Œ€ํ•ด ์•Œ๊ณ  ์žˆ๋Š” ์ƒํƒœ์—์„œ ์ปดํŒŒ์ผ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

    • ์‹คํ–‰๋˜์ง€ ์•Š์€ ์–ด๋…ธํ…Œ์ด์…˜ ํ”„๋กœ์„ธ์„œ๋“ค์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

    • ํ”„๋กœ์„ธ์„œ ๋‚ด๋ถ€์—์„œ ์–ด๋…ธํ…Œ์ด์…˜์„ ๋ถ™์ธ ํด๋ž˜์Šค, ๋ฉ”์†Œ๋“œ, ๋ฉค๋ฒ„๋ณ€์ˆ˜๋“ค์— ๋Œ€ํ•œ ์ฒ˜๋ฆฌ๋ฅผ ํ•ฉ๋‹ˆ๋‹ค.

    • ์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ๋ชจ๋“  ์–ด๋…ธํ…Œ์ด์…˜ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์‹คํ–‰๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•˜๊ณ , ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ๋ฐ˜๋ณตํ•ด์„œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

    • ์ฐธ์กฐ (https://www.charlezz.com/?p=1167, https://mysend12.medium.com/java-annotation-processor-1-7f95693748ef)

    ๋ฐ˜์‘ํ˜•
Designed by Tistory.