Example usage for org.aspectj.asm IHierarchy setRoot

List of usage examples for org.aspectj.asm IHierarchy setRoot

Introduction

In this page you can find the example usage for org.aspectj.asm IHierarchy setRoot.

Prototype

public void setRoot(IProgramElement root);

Source Link

Usage

From source file:org.caesarj.compiler.asm.CaesarAsmBuilder.java

License:Open Source License

/**
 * Prepares the asmManager to build./*from   w w w .  j av a  2  s  . c o  m*/
 * 
 * This method will initialize the IHierarchy with a root node, reset
 * the maps we can and clear the relationship map.
 * 
 * @param asmManager The asmManager to be initialized
 */
public static void preBuild(CaesarJAsmManager asmManager) {

    String rootLabel = "<root>"; //$NON-NLS-1$

    IHierarchy hierarchy = asmManager.getHierarchy();

    // Creates a Java File node as the root
    hierarchy.setRoot(new ProgramElement(rootLabel, IProgramElement.Kind.PROJECT, new ArrayList()));
    hierarchy.setFileMap(new HashMap());

    asmManager.getRelationshipMap().clear();
}