本文整理汇总了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());
});
});
}
示例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());
});
}
示例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());
}
示例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());
}
}
示例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()));
}
示例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));
}