annotation 인스턴스
1376 단어 annotation
지정한 디렉터리의 모든class를 불러옵니다. 주석을 통해 실체 클래스를 구분합니다.
package com.annotation.annoBean;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.annotation.HBID;
import com.annotation.HBean;
import com.tools.ClassLoaderUtil;
public class AnnotationBeanLoader {
private static String beanRootPath = "/com/annotation";//bean root
public static Map<String,Class<HBean>> loadHandlerBean() throws Exception{
Map<String, Class<HBean>> beanMap = new HashMap<String, Class<HBean>>();
List<Class<?>> classes = ClassLoaderUtil.loadClassesFromPath(beanRootPath);
for (int i = 0; i < classes.size(); i++) {
Class<?> c = classes.get(i);
if(classes.get(i).isAnnotationPresent(HBID.class)){
HBID hbid = classes.get(i).getAnnotation(HBID.class);
String id = hbid.catalog()+"-"+hbid.id();
if(c.isAssignableFrom(HBean.class))
beanMap.put(id, (Class<HBean>) c);
}
}
return beanMap;
}
}
하위 클래스를 가져오려면 다음과 같이 하십시오.
http://blackproof.iteye.com/blog/2015036
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
【Semantic Segmentation】 video의 연속성을 사용하여 data의 부피 증가annotation data를 늘리려는 것이 이 논문의 메인 테마이다. optical flow를 아는 사람이라면 간단하게 이미지 할 수 있다고 생각하지만, 이미지와 Ground Truth 데이터의 pixel을 함께 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.