org.jvnet.hk2.component.MultiMap.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(65)

本文整理了Java中org.jvnet.hk2.component.MultiMap.<init>()方法的一些代码示例,展示了MultiMap.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.<init>()方法的具体详情如下:
包路径:org.jvnet.hk2.component.MultiMap
类名称:MultiMap
方法名:<init>

MultiMap.<init>介绍

[英]Creates an empty multi-map with default concurrency controls
[中]使用默认并发控制创建空的多重映射

代码示例

代码示例来源:origin: javaee/glassfish

public MultiMap<String, String> process(TypeElement d) {
  visited.clear();
  MultiMap<String,String> r = new MultiMap<String, String>();
  check(d,r);
  return r;
}

代码示例来源:origin: javaee/glassfish

static MultiMap<String, String> split(String value) {
  MultiMap<String, String> result = new MultiMap<String, String>();
  String split[] = value.split(",");
  for (String s : split) {
   String split2[] = s.split("=");
   assert(2 == split2.length);
   result.add(split2[0], split2[1]);
  }
  return result;
 }
}

代码示例来源:origin: com.sun.enterprise/auto-depends

public DescriptorImpl(String name, String typeName) {
  this.name = name;
  this.typeName = typeName;
  this.metadata = new MultiMap<String, String>();
}

代码示例来源:origin: org.glassfish.hk2/auto-depends

/**
 * Creates a copy of the map that contains the exact same key and value set.
 * Keys and values won't cloned.
 */
@Override
public MultiMap<K, V> clone() {
  return new MultiMap<K, V>(this);
}

代码示例来源:origin: com.sun.enterprise/auto-depends

/**
 * Creates a copy of the map that contains the exact same key and value set.
 * Keys and values won't cloned.
 */
@Override
public MultiMap<K, V> clone() {
  return new MultiMap<K, V>(this);
}

代码示例来源:origin: com.sun.enterprise/auto-depends

public ExistingSingletonInhabitant(Class<T> type, T object, MultiMap<String,String> metadata) {
  this.type = type;
  this.object = object;
  this.metadata = (null == metadata) ? new MultiMap<String,String>() : metadata;
}

代码示例来源:origin: org.glassfish.hk2/config

private void initConfiguredByCollection() {
 if (null == configuredBy) {
  configuredBy = new MultiMap<String, ConfigByInhabitant>();
 }
}

代码示例来源:origin: com.sun.enterprise/config

ConfigByInhabitant(InhabitantStore store,
   ConfigByMetaInhabitant lead,
   ConfigByCreator managedServiceCreator,
   MultiMap<String, String> md) {
 this.store = store;
 this.lead = lead;
 this.managedServiceCreator = managedServiceCreator;
 this.metadata = (null == md) ? new MultiMap<String, String>() : md;
}

代码示例来源:origin: com.sun.enterprise/config

private void initConfiguredByCollection() {
 if (null == configuredBy) {
  configuredBy = new MultiMap<String, ConfigByInhabitant>();
 }
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

/**
 * Creates a copy of the map that contains the exact same key and value set.
 * Keys and values won't cloned.
 */
@Override
public MultiMap<K, V> clone() throws CloneNotSupportedException {
  super.clone();
  
  return new MultiMap<K, V>(this);
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

/**
 * Creates a copy of the map that contains the exact same key and value set.
 * Keys and values won't cloned.
 */
@Override
public MultiMap<K, V> clone() throws CloneNotSupportedException {
  super.clone();
  
  return new MultiMap<K, V>(this);
}

代码示例来源:origin: com.sun.enterprise/config

MultiMap<String, ConfigByInhabitant> get(Object bean) {
 // return a copy so that Transaction has there own working area
 MultiMap<String, ConfigByInhabitant> orig = beanToManagedConfigBy.get(bean);
 return (null == orig) ? null : new MultiMap<String, ConfigByInhabitant>();
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

/**
 * Creates a copy of the map that contains the exact same key and value set.
 * Keys and values won't cloned.
 */
@Override
public MultiMap<K, V> clone() throws CloneNotSupportedException {
  super.clone();
  
  return new MultiMap<K, V>(this);
}

代码示例来源:origin: javaee/hk2

/**
 * Creates a copy of the map that contains the exact same key and value set.
 * Keys and values won't cloned.
 */
@Override
public MultiMap<K, V> clone() throws CloneNotSupportedException {
  super.clone();
  
  return new MultiMap<K, V>(this);
}

代码示例来源:origin: com.sun.enterprise/auto-depends

protected MultiMap<String, String> populateMetadata() {
  // todo : more work needed to support all metadata entries
  MultiMap<String, String> inhMetadata = new MultiMap<String, String>();
  for (Class<? extends Annotation> annotation : metadata.annotations) {
    inhMetadata.add(InhabitantsFile.QUALIFIER_KEY, annotation.getName());
  }
  return inhMetadata;
}

代码示例来源:origin: org.glassfish.hk2/auto-depends

@Override
  Inhabitant<?> registerIn(Habitat habitat) {
    LazyInhabitant inhabitant = new LazyInhabitant(habitat, loader, className, new MultiMap<String,String>());
    super.registerIn(habitat, inhabitant);
    return inhabitant;
  }
}

代码示例来源:origin: eclipse-ee4j/glassfish

public MultiMap<String, String> process(TypeElement d) {
  visited.clear();
  MultiMap<String,String> r = new MultiMap<String, String>();
  check(d,r);
  return r;
}

代码示例来源:origin: eclipse-ee4j/glassfish

static MultiMap<String, String> split(String value) {
  MultiMap<String, String> result = new MultiMap<String, String>();
  String split[] = value.split(",");
  for (String s : split) {
   String split2[] = s.split("=");
   assert(2 == split2.length);
   result.add(split2[0], split2[1]);
  }
  return result;
 }
}

代码示例来源:origin: org.glassfish.hk2/auto-depends

protected MultiMap<String, String> populateMetadata() {
  // todo : more work needed to support all metadata entries
  MultiMap<String, String> inhMetadata = new MultiMap<String, String>();
  for (Class<? extends Annotation> annotation : metadata.annotations) {
    inhMetadata.add(InhabitantsFile.QUALIFIER_KEY, annotation.getName());
  }
  for (String contract : metadata.contracts.keySet()) {
    inhMetadata.add(InhabitantsFile.INDEX_KEY, contract);
  }
  return inhMetadata;
}

代码示例来源:origin: com.sun.enterprise/auto-depends

public DescriptorImpl(Descriptor other) {
    this.name = other.getName();
    // TODO:
//        this.scope = other.getScope();
    this.typeName = other.getTypeName();
    this.qualifiers.addAll(other.getQualifiers());
    this.contracts.addAll(other.getContracts());
    this.metadata = new MultiMap<String, String>(other.getMetadata());
  }

相关文章