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


Java DataInputOutputUtil.writeSeq方法代码示例

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


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

示例1: save

import com.intellij.util.io.DataInputOutputUtil; //导入方法依赖的package包/类
@Override
public void save(DataOutput dataOutput, List<Unity3dYMLAsset> list) throws IOException
{
	DataInputOutputUtil.writeSeq(dataOutput, list, asset ->
	{
		dataOutput.writeUTF(asset.getGuild());
		dataOutput.writeInt(asset.getStartOffset());
		String gameObjectName = asset.getGameObjectName();
		dataOutput.writeBoolean(gameObjectName != null);
		if(gameObjectName != null)
		{
			dataOutput.writeUTF(gameObjectName);
		}

		DataInputOutputUtil.writeSeq(dataOutput, asset.getValues(), it ->
		{
			dataOutput.writeUTF(it.getName());
			dataOutput.writeUTF(it.getValue());
			dataOutput.writeInt(it.getOffset());
		});
	});
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:23,代码来源:Unity3dYMLAssetIndexExtension.java

示例2: save

import com.intellij.util.io.DataInputOutputUtil; //导入方法依赖的package包/类
@Override
public void save(DataOutput out, Map<Integer, MethodData> value) throws IOException
{
	DataInputOutputUtil.writeSeq(out, value.entrySet(), it ->
	{
		DataInputOutputUtil.writeINT(out, it.getKey());
		writeMethod(out, it.getValue());
	});
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:MethodDataExternalizer.java

示例3: writeMethod

import com.intellij.util.io.DataInputOutputUtil; //导入方法依赖的package包/类
private static void writeMethod(DataOutput out, MethodData data) throws IOException
{
	DataInputOutputUtil.writeNullable(out, data.getNullity(), it -> writeNullity(out, it));
	DataInputOutputUtil.writeNullable(out, data.getPurity(), it -> writePurity(out, it));
	DataInputOutputUtil.writeSeq(out, data.getContracts(), it -> writeContract(out, it));
	DataInputOutputUtil.writeINT(out, data.getBodyStart());
	DataInputOutputUtil.writeINT(out, data.getBodyEnd());
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:9,代码来源:MethodDataExternalizer.java

示例4: writeContract

import com.intellij.util.io.DataInputOutputUtil; //导入方法依赖的package包/类
private static void writeContract(DataOutput out, PreContract contract) throws IOException
{
	if(contract instanceof DelegationContract)
	{
		out.writeByte(0);
		writeRange(out, ((DelegationContract) contract).getExpression());
		out.writeBoolean(((DelegationContract) contract).isNegated());
	}
	else if(contract instanceof KnownContract)
	{
		out.writeByte(1);
		writeContractArguments(out, Arrays.asList(((KnownContract) contract).getContract().arguments));
		out.writeByte(((KnownContract) contract).getContract().getReturnValue().ordinal());
	}
	else if(contract instanceof MethodCallContract)
	{
		out.writeByte(2);
		writeRange(out, ((MethodCallContract) contract).getCall());
		DataInputOutputUtil.writeSeq(out, ((MethodCallContract) contract).getStates(), it -> writeContractArguments(out, it));
	}
	else if(contract instanceof NegatingContract)
	{
		out.writeByte(3);
		writeContract(out, ((NegatingContract) contract).getNegated());
	}
	else if(contract instanceof SideEffectFilter)
	{
		out.writeByte(4);
		writeRanges(out, ((SideEffectFilter) contract).getExpressionsToCheck());
		DataInputOutputUtil.writeSeq(out, ((SideEffectFilter) contract).getContracts(), it -> writeContract(out, it));
	}
	else
	{
		throw new IllegalArgumentException(contract.toString());
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:37,代码来源:MethodDataExternalizer.java

示例5: writeContractArguments

import com.intellij.util.io.DataInputOutputUtil; //导入方法依赖的package包/类
private static void writeContractArguments(DataOutput out, List<MethodContract.ValueConstraint> arguments) throws IOException
{
	DataInputOutputUtil.writeSeq(out, arguments, it -> out.writeByte(it.ordinal()));
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:5,代码来源:MethodDataExternalizer.java

示例6: writeRanges

import com.intellij.util.io.DataInputOutputUtil; //导入方法依赖的package包/类
private static void writeRanges(DataOutput out, List<ExpressionRange> ranges) throws IOException
{
	DataInputOutputUtil.writeSeq(out, ranges, expressionRange -> writeRange(out, expressionRange));
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:5,代码来源:MethodDataExternalizer.java


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