Пример #1
0
 /**
  * Slightly modifies the behaviour of the phases based on what the caller really needs. Some
  * invocations of the compilation infrastructure don't need the bytecode, so we can skip creating
  * it, they would rather have a more 'source like' AST.
  *
  * @param isReconcile is this a reconciling compile?
  */
 public void tweak(boolean isReconcile) {
   // Cant do this for field initializers. They need to be in the constructor in order for them to
   // be correctly visited by the verifier and have certain optimizations performed (creating
   // returns)
   if (isReconcile) {
     verifier.inlineStaticFieldInitializersIntoClinit = false;
     //        	verifier.inlineFieldInitializersIntoInit=false;
     staticImportVisitor.isReconcile = true;
   } else {
     verifier.inlineStaticFieldInitializersIntoClinit = true;
     //        	verifier.inlineFieldInitializersIntoInit=true;
   }
   this.isReconcile = isReconcile;
 }
Пример #2
0
 public void call(SourceUnit source, GeneratorContext context, ClassNode classNode)
     throws CompilationFailedException {
   staticImportVisitor.visitClass(classNode, source);
 }