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


Java DfaMemoryState.push方法代码示例

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


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

示例1: accept

import com.intellij.codeInspection.dataFlow.DfaMemoryState; //导入方法依赖的package包/类
@Override
public DfaInstructionState[] accept(DataFlowRunner runner, DfaMemoryState memState, InstructionVisitor visitor) {
  if (myDuplicationCount == 1 && myValueCount == 1) {
    memState.push(memState.peek());
  } else {
    List<DfaValue> values = new ArrayList<DfaValue>(myValueCount);
    for (int i = 0; i < myValueCount; i++) {
      values.add(memState.pop());
    }
    for (int j = 0; j < myDuplicationCount + 1; j++) {
      for (int i = values.size() - 1; i >= 0; i--) {
        memState.push(values.get(i));
      }
    }
  }
  Instruction nextInstruction = runner.getInstruction(getIndex() + 1);
  return new DfaInstructionState[]{new DfaInstructionState(nextInstruction, memState)};
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:DupInstruction.java

示例2: accept

import com.intellij.codeInspection.dataFlow.DfaMemoryState; //导入方法依赖的package包/类
@Override
public DfaInstructionState[] accept(DataFlowRunner runner, DfaMemoryState memState, InstructionVisitor visitor) {
  if (myDuplicationCount == 1 && myValueCount == 1) {
    memState.push(memState.peek());
  } else {
    List<DfaValue> values = new ArrayList<DfaValue>(myValueCount);
    for (int i = 0; i < myValueCount; i++) {
      values.add(memState.pop());
    }
    for (int j = 0; j < myDuplicationCount; j++) {
      for (int i = values.size() - 1; i >= 0; i--) {
        memState.push(values.get(i));
      }
    }
  }
  Instruction nextInstruction = runner.getInstruction(getIndex() + 1);
  return new DfaInstructionState[]{new DfaInstructionState(nextInstruction, memState)};
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:DupInstruction.java

示例3: accept

import com.intellij.codeInspection.dataFlow.DfaMemoryState; //导入方法依赖的package包/类
@Override
public DfaInstructionState[] accept(DataFlowRunner runner, DfaMemoryState memState, InstructionVisitor visitor)
{
	if(myDuplicationCount == 1 && myValueCount == 1)
	{
		memState.push(memState.peek());
	}
	else
	{
		List<DfaValue> values = new ArrayList<DfaValue>(myValueCount);
		for(int i = 0; i < myValueCount; i++)
		{
			values.add(memState.pop());
		}
		for(int j = 0; j < myDuplicationCount + 1; j++)
		{
			for(int i = values.size() - 1; i >= 0; i--)
			{
				memState.push(values.get(i));
			}
		}
	}
	Instruction nextInstruction = runner.getInstruction(getIndex() + 1);
	return new DfaInstructionState[]{new DfaInstructionState(nextInstruction, memState)};
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:26,代码来源:DupInstruction.java

示例4: accept

import com.intellij.codeInspection.dataFlow.DfaMemoryState; //导入方法依赖的package包/类
@Override
public DfaInstructionState[] accept(DataFlowRunner runner, DfaMemoryState stateBefore, InstructionVisitor visitor) {
  final DfaValue a = stateBefore.pop();
  final DfaValue b = stateBefore.pop();
  stateBefore.push(a);
  stateBefore.push(b);
  Instruction nextInstruction = runner.getInstruction(getIndex() + 1);
  return new DfaInstructionState[]{new DfaInstructionState(nextInstruction, stateBefore)};
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SwapInstruction.java

示例5: accept

import com.intellij.codeInspection.dataFlow.DfaMemoryState; //导入方法依赖的package包/类
@Override
public DfaInstructionState[] accept(DataFlowRunner runner, DfaMemoryState stateBefore, InstructionVisitor visitor)
{
	final DfaValue a = stateBefore.pop();
	final DfaValue b = stateBefore.pop();
	stateBefore.push(a);
	stateBefore.push(b);
	Instruction nextInstruction = runner.getInstruction(getIndex() + 1);
	return new DfaInstructionState[]{new DfaInstructionState(nextInstruction, stateBefore)};
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:11,代码来源:SwapInstruction.java

示例6: visitInstanceof

import com.intellij.codeInspection.dataFlow.DfaMemoryState; //导入方法依赖的package包/类
@Override
public DfaInstructionState[] visitInstanceof(InstanceofInstruction instruction, DataFlowRunner runner, DfaMemoryState memState)
{
	memState.pop();
	memState.pop();
	memState.push(new DfaInstanceofValue(runner.getFactory(), instruction.getLeft(), instruction.getCastType()));
	return new DfaInstructionState[]{new DfaInstructionState(runner.getInstruction(instruction.getIndex() + 1), memState)};
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:9,代码来源:GuessManagerImpl.java


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