본문 바로가기

기술스택/ASM - [Bytecode]

ASM 학습 정리

목차

     

    공식 Reference 기반 번역 및 학습

    1. Introduction

     

    https://csg1353.tistory.com/163

     

    [A Java bytecode engineering library] 1. Introduction

    1.1. Motivations 프로그램 분석, 생성 및 변환은 다양한 상황에서 유용하게 사용될 수 있는 기술이다. • 프로그램 분석은 간단한 구문 분석부터 전체 의미 분석에 이르기까지 다양하며, 응용 프로

    csg1353.tistory.com

     

     

     [Core API] 2. Classes[1/2]

     

    https://csg1353.tistory.com/164

     

    [A Java bytecode engineering library] - [Core API] 2. Classes[1/2]

    실습 파일 및 내용 요약 https://csg1353.tistory.com/167 [ASM Library Guildline]chap02 실습파일 Logic package com.sch.testapm.test.controller; import com.sch.testapm.reference.chap2.ClassPrinter; import lombok.extern.slf4j.Slf4j; import org.obje

    csg1353.tistory.com

     

     [Core API] 2. Classes[2/2]

    https://csg1353.tistory.com/165

     

    [A Java bytecode engineering library] - [Core API] 2. Classes[2/2]

    2. 클래스[2/2] 2.2.4. 클래스 변환( Transforming classes) 지금까지 ClassReader 및 ClassWriter 구성 요소는 독립적으로 사용되었다. 이벤트는 "수동으로" 생성되어 ClassWriter에 직접 소비되거나, 대칭적으로 Clas

    csg1353.tistory.com

     

     

    [Core API] 3. Method[1/3]

    https://csg1353.tistory.com/166

     

    [A Java bytecode engineering library] - [Core API] 3. Method[1/3]

    https://d2.naver.com/helloworld/1230 개인 요약 노트 이전 장에서 ClassVisitor의 구현체가 내부에서 'visitCode', 'visitMethod' 등 기능을 Override했었다. 추가적인 내용은 없었지만 사실 이 내부에서 바이트코드 명

    csg1353.tistory.com

     

    [Core API] 3. Method[2/3]

    https://csg1353.tistory.com/183

     

    [A Java bytecode engineering library] - [Core API] 3. Method[2/3]

    개인 요약 및 정리 Overview 3장 2절은 클래스 멤버(필드, 메서드 등)의 변형, 추가, 제거 방법을 다룬다. 이 과정에서 ClassVisitor와 MethodVisitor 인터페이스의 활용이 중요하다. 여기서는 간단한 변형부

    csg1353.tistory.com

     

    [Core API] 3. Method[3/3]

    https://csg1353.tistory.com/189

     

    [A Java bytecode engineering library] - [Core API] 3. Method[3/3]

    3.3. 도구들 (tools) org.objectweb.asm.commons 패키지에는 자신만의 어댑터를 정의하는데 유용할 수 있는 몇 가지 사전 정의된 메소드 어댑터들이 포함되어 있다. 이 섹션에서는 그 중 세 가지를 소개하

    csg1353.tistory.com

     

    [Core API] 4. Metadata

    https://csg1353.tistory.com/190

     

    [A Java bytecode engineering library] - [Core API] 4. Metadata

    개인 내용 정리 시그니처와 SignatureVisitor 시그니처 : 클래스, 인터페이스, 필드, 메소드 등을 JVM이나 컴파일러가 인식할 수 있도록 정의한 기술적인 정보. SignatureVisitor는 ASM 라이브러리에서 제공

    csg1353.tistory.com

     

    [Core API] 5. Backward compatibility(역호환성)

    https://csg1353.tistory.com/191

     

    [A Java bytecode engineering library] - [Core API] 5. Backward compatibility(역호환성)

    해당 파트는 직접적인 개발은 아니지만, Legacy version의 호환 가능성과 규칙에 대해 정의한다. 5. Backward compatibility 5.1. 서론 과거에 클래스 파일 포맷에 새로운 요소가 도입되었고, 미래에도 새로

    csg1353.tistory.com

     

    [Tree API] 6. Classes

    https://csg1353.tistory.com/192

     

    [A Java bytecode engineering library] - [Tree API] 6. Classes

    개인 학습 정리 Tree API? ASM의 Tree API는 바이트코드 조작을 위한 보다 높은 수준의 추상화를 제공한다. Core API가 방문자 패턴(visitor pattern)에 의존하여 바이트코드를 직접 조작하는 방식이라면, Tree

    csg1353.tistory.com

     

    [Tree API] 7. Method

    https://csg1353.tistory.com/197

     

    [A Java bytecode engineering library] - [Tree API] 7. Method

    개인 학습 정리 MethodNode public class MethodNode extends MethodVisitor { public int access; // 메서드의 접근 제어자. 예: ACC_PUBLIC, ACC_PRIVATE 등 public String name; // 메서드 이름 public String desc; // 메서드 서술자(descrip

    csg1353.tistory.com

     

    [Tree API] 8. Method Analysis

    https://csg1353.tistory.com/198

     

    [A Java bytecode engineering library] - [Tree API] 8. Method Analysis

    8. Method Analysis 이 장에서는 메소드의 코드를 분석하는 ASM API를 소개한다. 이 API는 트리 API를 기반으로 한다. 코드 분석 알고리즘 소개로 시작하여, 해당 ASM API와 일부 예시를 제시한다. 8.1. 소개

    csg1353.tistory.com

     

    [Tree API] 9.Metadata

    https://csg1353.tistory.com/201

     

    [A Java bytecode engineering library] - [Tree API] 9.Metadata

    이번 파트는 상대적으로 짧은 편이다. 9. 메타데이터(Metadata) 이 장에서는 컴파일된 자바 클래스의 메타데이터(예: 애너테이션)에 대한 트리 API를 소개한다. 이 메타데이터는 이미 4장에서 소개되

    csg1353.tistory.com