/** * Creates a ClassNode from a real class. The resulting ClassNode will not be a primary ClassNode. */ public ClassNode(Class c) { this(c.getName(), c.getModifiers(), null, null, MixinNode.EMPTY_ARRAY); clazz = c; lazyInitDone = false; CompileUnit cu = getCompileUnit(); if (cu != null) cu.addClass(this); isPrimaryNode = false; }
private ClassNode makeClassNode(CompileUnit cu, Type t, Class c) { ClassNode back = null; if (cu != null) back = cu.getClass(c.getName()); if (back == null) back = ClassHelper.make(c); if (!(t instanceof Class)) { ClassNode front = configureType(t); front.setRedirect(back); return front; } return back; }