@Test public void testConfigFieldsDefiner() { final String field = "UNDEFINED"; final String value = "blah"; Map<String, String> config = new HashMap<>(); config.put(field, value); byte[] bytecode = ConfigFieldsDefiner.define(className, classFile, config); ConfigClassScanner configClassScanner = runClassScanner(className, null, bytecode); Object definedValue = configClassScanner.getPublicStaticFieldValue(field); assertEquals(value, definedValue); }
private ConfigFieldsDefiner( int classWriterFlags, String className, ConfigClassScanner configScanner, Map<String, ?> config) { super(classWriterFlags, className); this.configScanner = configScanner; this.config = config; }
ConfigFieldsDefiner extends PrototypicalClassAdapter { private ConfigFieldsDefiner( int classWriterFlags, String className, ConfigClassScanner configScanner, Map<String, ?> config) { super(classWriterFlags, className); this.configScanner = configScanner; this.config = config; } }
ConfigFieldsDefiner extends PrototypicalClassAdapter { private ConfigFieldsDefiner( int classWriterFlags, String className, ConfigClassScanner configScanner, Map<String, ?> config) { super(classWriterFlags, className); this.configScanner = configScanner; this.config = config; } private  ConfigFieldsDefiner(
      int classWriterFlags, 
      String className, 
      ConfigClassScanner configScanner,
      Map<String, ?> config); }
ConfigFieldsDefiner extends PrototypicalClassAdapter { private ConfigFieldsDefiner( int classWriterFlags, String className, ConfigClassScanner configScanner, Map<String, ?> config) { super(classWriterFlags, className); this.configScanner = configScanner; this.config = config; } private  ConfigFieldsDefiner(
      int classWriterFlags, 
      String className, 
      ConfigClassScanner configScanner,
      Map<String, ?> config); static byte[] define(String className, File classFile, Map<String, ?> config); static Type toPrimitiveType(Class<?> klass); @Override FieldVisitor visitField(int access, String name, String desc,
      String signature, Object value); @Override MethodVisitor visitMethod(int access, String name, String desc, 
      String signature, String[] exceptions); @Override void visitEnd(); }
ConfigFieldsDefiner extends PrototypicalClassAdapter { private ConfigFieldsDefiner( int classWriterFlags, String className, ConfigClassScanner configScanner, Map<String, ?> config) { super(classWriterFlags, className); this.configScanner = configScanner; this.config = config; } private  ConfigFieldsDefiner(
      int classWriterFlags, 
      String className, 
      ConfigClassScanner configScanner,
      Map<String, ?> config); static byte[] define(String className, File classFile, Map<String, ?> config); static Type toPrimitiveType(Class<?> klass); @Override FieldVisitor visitField(int access, String name, String desc,
      String signature, Object value); @Override MethodVisitor visitMethod(int access, String name, String desc, 
      String signature, String[] exceptions); @Override void visitEnd();  }