com.jdon.container.annotation.AnnotationHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdonframework Show documentation
Show all versions of jdonframework Show documentation
JdonFramework is a java framework that you can use to build your Domain Driven Design + CQRS + EventSource applications with asynchronous concurrency and higher throughput.
package com.jdon.container.annotation;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import com.jdon.container.access.TargetMetaDefHolder;
public class AnnotationHolder {
public final static String NAME = AnnotationHolder.class.getSimpleName();
// key component name, class is Component class
private Map classes;
// key Component class, class is component name
private Map xClasses;
private Map interceptors;
private TargetMetaDefHolder targetMetaDefHolder;
public AnnotationHolder() {
this.classes = new LinkedHashMap();
this.xClasses = new LinkedHashMap();
this.interceptors = new LinkedHashMap();
this.targetMetaDefHolder = new TargetMetaDefHolder();
}
public void addComponent(String name, Class componentClass) {
classes.put(name, componentClass);
xClasses.put(componentClass, name);
}
public Set getComponentNames() {
return classes.keySet();
}
public Class getComponentClass(String name) {
return classes.get(name);
}
public String getComponentName(Class componentClass) {
return xClasses.get(componentClass);
}
public Map getInterceptors() {
return interceptors;
}
public Map getxClasses() {
return xClasses;
}
public TargetMetaDefHolder getTargetMetaDefHolder() {
return targetMetaDefHolder;
}
public void setTargetMetaDefHolder(TargetMetaDefHolder targetMetaDefHolder) {
this.targetMetaDefHolder = targetMetaDefHolder;
}
}