public ClassNode getPlainNodeReference() { if (ClassHelper.isPrimitiveType(this)) return this; ClassNode n = new ClassNode(name, modifiers, superClass, null, null); n.isPrimaryNode = false; n.setRedirect(redirect()); if (isArray()) { n.componentType = redirect().getComponentType(); } return n; }
/** Returns a ClassNode representing an array of the class represented by this ClassNode */ public ClassNode makeArray() { if (redirect != null) { ClassNode res = redirect().makeArray(); res.componentType = this; return res; } ClassNode cn; if (clazz != null) { Class ret = Array.newInstance(clazz, 0).getClass(); // don't use the ClassHelper here! cn = new ClassNode(ret, this); } else { cn = new ClassNode(this); } return cn; }