예제 #1
0
 /**
  * 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;
 }
예제 #2
0
파일: Java5.java 프로젝트: bodiam/discobot
 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;
 }