当前位置: 首页>>代码示例>>Java>>正文


Java CollectionLiterals.emptyMap方法代码示例

本文整理汇总了Java中org.eclipse.xtext.xbase.lib.CollectionLiterals.emptyMap方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionLiterals.emptyMap方法的具体用法?Java CollectionLiterals.emptyMap怎么用?Java CollectionLiterals.emptyMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.xtext.xbase.lib.CollectionLiterals的用法示例。


在下文中一共展示了CollectionLiterals.emptyMap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readContents

import org.eclipse.xtext.xbase.lib.CollectionLiterals; //导入方法依赖的package包/类
protected void readContents(final StorageAwareResource resource, final InputStream inputStream) throws IOException {
  Map<Object, Object> _emptyMap = CollectionLiterals.<Object, Object>emptyMap();
  final BinaryResourceImpl.EObjectInputStream in = new BinaryResourceImpl.EObjectInputStream(inputStream, _emptyMap) {
    @Override
    public int readCompressedInt() throws IOException {
      int _xblockexpression = (int) 0;
      {
        this.resourceSet = null;
        _xblockexpression = super.readCompressedInt();
      }
      return _xblockexpression;
    }
    
    @Override
    public InternalEObject loadEObject() throws IOException {
      final InternalEObject result = super.loadEObject();
      ResourceStorageLoadable.this.handleLoadEObject(result, this);
      return result;
    }
  };
  in.loadResource(resource);
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:23,代码来源:ResourceStorageLoadable.java

示例2: computeExportedObjectsMap

import org.eclipse.xtext.xbase.lib.CollectionLiterals; //导入方法依赖的package包/类
protected void computeExportedObjectsMap(final EObject source) {
  final Resource resource = source.eResource();
  final IResourceServiceProvider resourceServiceProvider = this.resourceServiceProviderRegistry.getResourceServiceProvider(resource.getURI());
  if ((resourceServiceProvider != null)) {
    final IResourceDescription resourceDescription = resourceServiceProvider.getResourceDescriptionManager().getResourceDescription(resource);
    this.exportedContainersInCurrentResource = CollectionLiterals.<EObject, URI>newHashMap();
    Iterable<IEObjectDescription> _exportedObjects = resourceDescription.getExportedObjects();
    for (final IEObjectDescription description : _exportedObjects) {
      {
        EObject instance = description.getEObjectOrProxy();
        boolean _eIsProxy = instance.eIsProxy();
        if (_eIsProxy) {
          instance = resource.getEObject(description.getEObjectURI().fragment());
        }
        this.exportedContainersInCurrentResource.put(instance, description.getEObjectURI());
      }
    }
  } else {
    this.exportedContainersInCurrentResource = CollectionLiterals.<EObject, URI>emptyMap();
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:22,代码来源:ReferenceAcceptor.java

示例3: writeContents

import org.eclipse.xtext.xbase.lib.CollectionLiterals; //导入方法依赖的package包/类
protected void writeContents(final StorageAwareResource storageAwareResource, final OutputStream outputStream) throws IOException {
  Map<Object, Object> _emptyMap = CollectionLiterals.<Object, Object>emptyMap();
  final BinaryResourceImpl.EObjectOutputStream out = new BinaryResourceImpl.EObjectOutputStream(outputStream, _emptyMap) {
    @Override
    public void writeURI(final URI uri, final String fragment) throws IOException {
      final URI fullURI = uri.appendFragment(fragment);
      URI _elvis = null;
      URI _portableURI = storageAwareResource.getPortableURIs().toPortableURI(storageAwareResource, fullURI);
      if (_portableURI != null) {
        _elvis = _portableURI;
      } else {
        _elvis = fullURI;
      }
      final URI uriToWrite = _elvis;
      super.writeURI(uriToWrite.trimFragment(), uriToWrite.fragment());
    }
    
    @Override
    public void saveEObject(final InternalEObject internalEObject, final BinaryResourceImpl.EObjectOutputStream.Check check) throws IOException {
      ResourceStorageWritable.this.beforeSaveEObject(internalEObject, this);
      super.saveEObject(internalEObject, check);
      ResourceStorageWritable.this.handleSaveEObject(internalEObject, this);
    }
  };
  try {
    out.saveResource(storageAwareResource);
  } finally {
    out.flush();
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:31,代码来源:ResourceStorageWritable.java

示例4: getTypesToNames

import org.eclipse.xtext.xbase.lib.CollectionLiterals; //导入方法依赖的package包/类
public Map<? extends JvmType, ? extends Set<String>> getTypesToNames() {
  return CollectionLiterals.<JvmType, Set<String>>emptyMap();
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:4,代码来源:TypeBucket.java

示例5: contentDescription

import org.eclipse.xtext.xbase.lib.CollectionLiterals; //导入方法依赖的package包/类
@Override
public Map<String, ?> contentDescription(final URI uri, final Map<?, ?> options) throws IOException {
  return CollectionLiterals.<String, Object>emptyMap();
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:InMemoryURIHandler.java

示例6: getAttributes

import org.eclipse.xtext.xbase.lib.CollectionLiterals; //导入方法依赖的package包/类
@Override
public Map<String, ?> getAttributes(final URI uri, final Map<?, ?> options) {
  return CollectionLiterals.<String, Object>emptyMap();
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:InMemoryURIHandler.java


注:本文中的org.eclipse.xtext.xbase.lib.CollectionLiterals.emptyMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。