Example usage for org.eclipse.jdt.internal.compiler.lookup TypeVariableBinding debugName

List of usage examples for org.eclipse.jdt.internal.compiler.lookup TypeVariableBinding debugName

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup TypeVariableBinding debugName.

Prototype

@Override
public String debugName() 

Source Link

Usage

From source file:org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.java

License:Open Source License

/**
 * Based on Java5.configureTypeVariableReference()
 *//*from   ww  w  . j a v  a  2 s  .co m*/
private ClassNode configureTypeVariableReference(TypeVariableBinding tv) {
    ClassNode nodeInProgress = typeVariableConfigurationInProgress.get(tv);
    if (nodeInProgress != null) {
        return nodeInProgress;
    }
    ClassNode cn = ClassHelper.makeWithoutCaching(tv.debugName());
    cn.setGenericsPlaceHolder(true);
    ClassNode cn2 = ClassHelper.makeWithoutCaching(tv.debugName());
    cn2.setGenericsPlaceHolder(true);
    GenericsType[] gts = new GenericsType[] { new GenericsType(cn2) };
    cn.setGenericsTypes(gts);
    cn.setRedirect(ClassHelper.OBJECT_TYPE);
    typeVariableConfigurationInProgress.put(tv, cn);
    // doing a bit of what is in Java5.makeClassNode() where it sorts out its front/back GR1563
    TypeBinding tb = tv.firstBound;
    if (tb != null && !tb.debugName().equals("java.lang.Object")) {
        ClassNode back = configureType(tb);
        cn.setRedirect(back);
    }
    typeVariableConfigurationInProgress.remove(tv);
    return cn;
}