Example usage for org.aspectj.apache.bcel.generic MethodGen getClassName

List of usage examples for org.aspectj.apache.bcel.generic MethodGen getClassName

Introduction

In this page you can find the example usage for org.aspectj.apache.bcel.generic MethodGen getClassName.

Prototype

public String getClassName() 

Source Link

Usage

From source file:br.jabuti.metrics.AbstractMetric.java

License:Open Source License

protected final CFG getCFG(MethodGen mg, ClassGen cg) throws InvalidInstructionException, InvalidStackArgument {
    String s = mg.getClassName() + "." + mg.getName() + mg.getSignature();
    Object osg = graphTable.get(s);
    if (osg == null) {
        CFG g = new CFG(mg, cg);
        String sg = Persistency.add(g);
        if (sg != null) {
            graphTable.put(s, sg);// w  w  w.  ja  v  a 2 s . co m
        } else {
            graphTable.put(s, g);
        }
        return g;
    } else if (osg instanceof String) {
        String sg = (String) osg;
        CFG g = null;
        try {
            g = (CFG) Persistency.get(sg);
        } catch (Exception e) {
        }
        return g;
    }
    return (CFG) osg;
}