일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Spring XD
- 도메인주도설계
- Clean Code
- Linux
- 스프링 배치
- 일본 백패킹
- Storm
- Java
- spark
- 인텔리J
- design pattern
- SBT
- DDD
- nginx
- 엘라스틱서치
- Spring Batch
- scala
- hdfs
- Gradle
- intellij
- elasticsearch
- Spring
- 제주
- apache storm
- elastic search
- hadoop
- Spring Boot
- Hbase
- Angular2
- docker
Archives
- Today
- Total
욱'S 노트
JCodeModel로 클래스 생성하기 본문
반응형
JCodeModel은 쉽게 클래스 소스를 생성할 수 있게 도와준다.
아래와 같이 단 3줄의 코딩으로도 간단하게 클래스 소스를 생성할 수 있다. 무작정 따라해보자.
@Test
public void testCreateClass() throws JClassAlreadyExistsException, IOException {
JCodeModel codeModel = new JCodeModel();
codeModel._class("net.daum.domaingen.TestClass");
codeModel.build(new File("/Users/devsun/dev/projects/domain-generator/src/test/java"));
}
생성된 소스는 다음과 같다.
package net.daum.domaingen;
public class TestClass {
}
반응형
'Programming > JCodeModel' 카테고리의 다른 글
JCodeModel 필드 선언하기 (0) | 2015.01.07 |
---|