本文整理匯總了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)};
}
示例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)};
}
示例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)};
}
示例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)};
}
示例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)};
}
示例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)};
}