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