當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。