public static GenericsType configureTypeVariableDefinition(ClassNode base, ClassNode[] cBounds) { ClassNode redirect = base.redirect(); base.setRedirect(null); GenericsType gt; if (cBounds == null || cBounds.length == 0) { gt = new GenericsType(base); } else { gt = new GenericsType(base, cBounds, null); gt.setName(base.getName()); gt.setPlaceholder(true); } base.setRedirect(redirect); return gt; }
private GenericsType configureTypeVariableDefinition(TypeVariable tv) { ClassNode base = configureTypeVariableReference(tv); ClassNode redirect = base.redirect(); base.setRedirect(null); Type[] tBounds = tv.getBounds(); GenericsType gt; if (tBounds.length == 0) { gt = new GenericsType(base); } else { ClassNode[] cBounds = configureTypes(tBounds); gt = new GenericsType(base, cBounds, null); gt.setName(base.getName()); gt.setPlaceholder(true); } base.setRedirect(redirect); return gt; }