本文整理汇总了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);
}
示例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();
}
}
示例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();
}
}
示例4: getTypesToNames
import org.eclipse.xtext.xbase.lib.CollectionLiterals; //导入方法依赖的package包/类
public Map<? extends JvmType, ? extends Set<String>> getTypesToNames() {
return CollectionLiterals.<JvmType, Set<String>>emptyMap();
}
示例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();
}
示例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();
}