WALA/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/cfg/DelegatingCFG.java

82 lines
2.2 KiB
Java
Raw Normal View History

/******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
package com.ibm.wala.cast.ir.cfg;
import com.ibm.wala.cfg.*;
import com.ibm.wala.classLoader.IMethod;
import com.ibm.wala.shrikeBT.IInstruction;
import com.ibm.wala.util.graph.*;
import com.ibm.wala.util.intset.BitVector;
import java.util.*;
public class DelegatingCFG extends AbstractNumberedGraph<IBasicBlock> implements ControlFlowGraph {
protected final ControlFlowGraph parent;
public DelegatingCFG(ControlFlowGraph parent) {
this.parent = parent;
}
protected NodeManager<IBasicBlock> getNodeManager() {
return parent;
}
protected EdgeManager<IBasicBlock> getEdgeManager() {
return parent;
}
public IBasicBlock entry() {
return parent.entry();
}
public IBasicBlock exit() {
return parent.exit();
}
public BitVector getCatchBlocks() {
return parent.getCatchBlocks();
}
public IBasicBlock getBlockForInstruction(int index) {
return parent.getBlockForInstruction(index);
}
public IInstruction[] getInstructions() {
return parent.getInstructions();
}
public int getProgramCounter(int index) {
return parent.getProgramCounter(index);
}
public IMethod getMethod() {
return parent.getMethod();
}
public Collection<IBasicBlock> getExceptionalSuccessors(IBasicBlock b) {
return parent.getExceptionalSuccessors(b);
}
public Collection<IBasicBlock> getNormalSuccessors(IBasicBlock b) {
return parent.getNormalSuccessors(b);
}
public Collection<IBasicBlock> getExceptionalPredecessors(IBasicBlock b) {
return parent.getExceptionalPredecessors(b);
}
public Collection<IBasicBlock> getNormalPredecessors(IBasicBlock b) {
return parent.getNormalPredecessors(b);
}
}