本文整理了Java中org.jvnet.hk2.component.MultiMap.emptyMap()
方法的一些代码示例,展示了MultiMap.emptyMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.emptyMap()
方法的具体详情如下:
包路径:org.jvnet.hk2.component.MultiMap
类名称:MultiMap
方法名:emptyMap
[英]Gets the singleton read-only empty multi-map.
[中]获取单例只读空多重映射。
代码示例来源:origin: com.sun.enterprise/auto-depends
@Override
public MultiMap<String, String> getMetadata() {
return org.jvnet.hk2.component.MultiMap.emptyMap();
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
@Override
public MultiMap<String, String> getMetadata() {
return org.jvnet.hk2.component.MultiMap.emptyMap();
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
public ExistingSingletonInhabitant(Class<T> type, T object) {
this(type,object,MultiMap.<String,String>emptyMap());
}
代码示例来源:origin: com.sun.enterprise/auto-depends
public ExistingSingletonInhabitant(Class<T> type, T object) {
this(type,object,MultiMap.<String,String>emptyMap());
}
代码示例来源:origin: com.sun.enterprise/config
/**
* @param in
* If provided, this is used to record the source location where this DOM object is loaded from.
* Otherwise this can be null.
*/
public Dom(Habitat habitat, DomDocument document, Dom parent, ConfigModel model, XMLStreamReader in) {
super(habitat,model.classLoaderHolder,model.targetTypeName,MultiMap.<String,String>emptyMap());
if (in!=null) {
this.location = new LocationImpl(in.getLocation());
} else {
this.location=null;
}
this.model = model;
this.document = document;
this.parent = parent;
assert parent==null || parent.document==document; // all the nodes in the tree must belong to the same document
}
代码示例来源:origin: org.glassfish.hk2/config
/**
* @param in
* If provided, this is used to record the source location where this DOM object is loaded from.
* Otherwise this can be null.
*/
public Dom(Habitat habitat, DomDocument document, Dom parent, ConfigModel model, XMLStreamReader in) {
super(habitat,model.classLoaderHolder,model.targetTypeName,MultiMap.<String,String>emptyMap());
if (in!=null) {
this.location = new LocationImpl(in.getLocation());
} else {
this.location=null;
}
this.model = model;
this.document = document;
this.parent = parent;
assert parent==null || parent.document==document; // all the nodes in the tree must belong to the same document
}
代码示例来源:origin: com.sun.enterprise/auto-depends
public boolean inhabitantIndexChanged(EventType eventType,
Habitat habitat, Inhabitant<?> i, String index, String name,
Object service) {
// for each FactoryFor component, insert inhabitant for components
// created by the factory
if (index.equals(FactoryFor.class.getName())) {
FactoryFor ff = i.type().getAnnotation(FactoryFor.class);
try {
Class<?> targetClasses[] = ff.value();
if (null != targetClasses && targetClasses.length > 0) {
for (Class<?> altClass : targetClasses) {
FactoryCreator target = new FactoryCreator(
altClass, i, habitat,
MultiMap.<String, String>emptyMap());
habitat.add(target);
habitat.addIndex(target, altClass.getName(), null);
}
}
} catch (AnnotationTypeMismatchException e) {
logger.log(Level.WARNING, "annotation error", e);
}
}
// System.out.println("Habitat Index Changed: " + eventType + "; " +
// i + "; index=" + index + "; name=" + name);
return true;
}
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
public boolean inhabitantIndexChanged(EventType eventType,
Habitat habitat, Inhabitant<?> i, String index, String name,
Object service) {
// for each FactoryFor component, insert inhabitant for components
// created by the factory
if (index.equals(FactoryFor.class.getName())) {
FactoryFor ff = i.type().getAnnotation(FactoryFor.class);
try {
Class<?> targetClasses[] = ff.value();
if (null != targetClasses && targetClasses.length > 0) {
for (Class<?> altClass : targetClasses) {
FactoryCreator target = new FactoryCreator(
altClass, i, habitat,
MultiMap.<String, String>emptyMap());
habitat.add(target);
habitat.addIndex(target, altClass.getName(), null);
}
}
} catch (AnnotationTypeMismatchException e) {
logger.log(Level.WARNING, "annotation error", e);
}
}
// System.out.println("Habitat Index Changed: " + eventType + "; " +
// i + "; index=" + index + "; name=" + name);
return true;
}
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
public DescriptorImpl(Descriptor other, boolean readOnly) {
this.names = new LinkedHashSet<String>(other.getNames());
this.typeName = other.getTypeName();
this.scope = (Scope) other.getScope();
this.qualifiers = new LinkedHashSet<String>(other.getQualifiers());
this.contracts = new LinkedHashSet<String>(other.getContracts());
if (null == other.getMetadata() || MultiMap.emptyMap() == (Object)other.getMetadata()) {
this.metadata = MultiMap.emptyMap();
} else {
this.metadata = new MultiMap<String, String>(other.getMetadata());
}
if (readOnly) {
setReadOnly();
}
}
内容来源于网络,如有侵权,请联系作者删除!