일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- web.xml
- bash
- DB 도메인
- grep
- maVen
- 공통표준용어
- port
- find
- import
- 네트워크
- ssh
- copy-dependencies
- xargs
- context
- lsof
- IntelliJ
- resource
- Source
- Windows
- Quartz
- 단축키
- profile
- Eclipse
- netsh
- tomcat
- JavaScript
- Mac
- VirtualBox
- Windows 10
- GIT
- Today
- Total
목록전체 글 (1659)
develog
@Override@Deprecated@SuppressWarnings @Documented@Inherited Meta Annotation (어노테이션 선언에 대한 어노테이션)@Target@Retention @Target 에서 사용 가능한 값@Type(ElementType.TYPE)@Type(ElementType.FIELD)@Type(ElementType.METHOD)@Type(ElementType.PARAMETER)@Type(ElementType.CONSTRUCTOR)@Type(ElementType.LOCAL_VARIABLE)@Type(ElementType.ANNOTATION_TYPE)@Type(ElementType.PACKAGE) // 여러 값 사용시 {} 사용@Type({ElementType.FIELD..
// Marker annotation 정의public @interface MyAnnotation { }// Marker annotation 사용@MyAnnotation // Single-value annotation 정의public @interface MyAnnotation { String value();} // Single-value annotation 사용@MyAnnotation("some data") // Full annotation 정의public @interface MyAnnotation {String name();String age();String gender();} // Full annotation 사용@MyAnnotation(name="", age="", gender="") // defau..
- Marker annotation ex) @MarkerAnnotation - Single-value annotation ex) @SingleValueAnnotation("some data") - Full annotation ex) @FullAnnotation(var1="data1", var2="data2", var3="value3")
1. 클래스 얻기 Object.getClass() UserVo vo = new UserVo(); System.out.println(vo.getClass()); .class System.out.println(UserVo.class); Class.forName("") try { System.out.println(Class.forName("vo.UserVo")); } catch (ClassNotFoundException e) { e.printStackTrace(); } 2. private field 셋팅 public class UserVo { private String name; public String getName() { return name; } } public static void main(String..
private void reflectionTest() { try { // get class Class clazz = Class.forName("vo.UserVo"); // create instance UserVo vo = (UserVo) clazz.newInstance(); // get field Field field = clazz.getDeclaredField("privateField"); // set field value field.setAccessible(true); field.set(vo, "aaaaaa"); // get field value String value = (String) field.get(vo); System.out.println(value); } catch (ClassNotFoun..
build.xml