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

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

Introduction

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

Prototype

@Override
    public String getSignature() 

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);//from w ww.ja va  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;
}