int compileIfStatic(CtClass type,String name,Bytecode code,Javac drv) throws CannotCompileException {
  String desc;
  code.addNew(objectType);
  code.add(Bytecode.DUP);
  int stacksize=2;
  if (stringParams == null)   desc="()V";
 else {
    desc="([Ljava/lang/String;)V";
    stacksize+=compileStringParameter(code);
  }
  code.addInvokespecial(objectType,"<init>",desc);
  code.addPutstatic(Bytecode.THIS,name,Descriptor.of(type));
  return stacksize;
}

int compileIfStatic ( CtClass type , String name , Bytecode code , Javac drv ) throws CannotCompileException { String desc ; code . addNew ( objectType ) ; code . add ( Bytecode . DUP ) ; int stacksize = 2 ; if ( stringParams == null ) desc = "()V" ; else { desc = "([Ljava/lang/String;)V" ; stacksize += compileStringParameter ( code ) ; } code . addInvokespecial ( objectType , "<init>" , desc ) ; code . addPutstatic ( Bytecode . THIS , name , Descriptor . of ( type ) ) ; return stacksize ; }
produces codes for a static field .
