package io.asfjava.ui.schema.generators.factory;

import java.util.concurrent.ConcurrentHashMap;

import io.asfjava.ui.schema.generators.DefaultGenerator;
import io.asfjava.ui.schema.interfaces.SchemaGenerator;

public class GeneratorFactory {

	private static ConcurrentHashMap<String, SchemaGenerator> generators = new ConcurrentHashMap<>();

	public static SchemaGenerator getGenerator(Class annotation) {
		if (!generators.contains(annotation.getName())) {
			return DefaultGenerator.getDefaultGenerator();
		}
		return generators.get(annotation.getName());
	}

	public static void registerDriver(Class annotation, SchemaGenerator generator) {
		if (annotation != null && generator != null) {
			generators.put(annotation.getName(), generator);
		}

	}

}

@@ -43,16 +43,63 @@
 ctory;%0A%0A
+import java.security.GeneralSecurityException;%0A
 import j
@@ -435,26 +435,24 @@
 r(Class 
-annotation
+genertor
 ) %7B%0A%09%09if
@@ -474,26 +474,24 @@
 ontains(
-annotation
+genertor
 .getName
@@ -575,26 +575,24 @@
 ors.get(
-annotation
+genertor
 .getName
@@ -641,26 +641,24 @@
 r(Class 
-annotation
+genertor
 , Schema
@@ -667,17 +667,23 @@
 nerator 
-g
+schemaG
 enerator
@@ -692,26 +692,24 @@
 %7B%0A%09%09if (
-annotation
+genertor
  != null
@@ -712,17 +712,23 @@
 null && 
-g
+schemaG
 enerator
@@ -761,18 +761,16 @@
 put(
-annotation
+genertor
 .get
@@ -777,17 +777,23 @@
 Name(), 
-g
+schemaG
 enerator

Change Variable name