Mass removal of all Tabs (Style Warnings)
[aaf/authz.git] / misc / rosetta / src / main / java / org / onap / aaf / misc / rosetta / JaxSet.java
index 04d6158..6a779fb 100644 (file)
@@ -38,54 +38,54 @@ import javax.xml.bind.annotation.XmlType;
  * @param <T>
  */
 public class JaxSet<T> {
-       private static Map<Class<?>,JaxSet<?>> jsets = new HashMap<>();
-       private Map<String,Setter<T>> members;
+    private static Map<Class<?>,JaxSet<?>> jsets = new HashMap<>();
+    private Map<String,Setter<T>> members;
 
-       private JaxSet(Class<?> cls) {
-               members = new TreeMap<>();
-               XmlType xmltype = cls.getAnnotation(XmlType.class);
-               Class<?> paramType[] = new Class[] {String.class};
-               for(String str : xmltype.propOrder()) {
-                       try {
-                               String setName = "set" + Character.toUpperCase(str.charAt(0)) + str.subSequence(1, str.length());
-                               Method meth = cls.getMethod(setName,paramType );
-                               if(meth!=null) {
-                                       members.put(str, new Setter<T>(meth) {
-                                               public void set(T o, Object t) throws ParseException {
-                                                       try {
-                                                               this.meth.invoke(o, t);
-                                                       } catch (Exception e) {
-                                                               throw new ParseException(e);
-                                                       }
-                                               }
-                                       });
-                               }
-                       } catch (Exception e) {
-                               // oops
-                       }
-               }
-       }
-       
-       public static abstract class Setter<O> {
-               protected final Method meth;
-               public Setter(Method meth) {
-                       this.meth = meth;
-               }
-               public abstract void set(O o, Object obj) throws ParseException;
-       }
+    private JaxSet(Class<?> cls) {
+        members = new TreeMap<>();
+        XmlType xmltype = cls.getAnnotation(XmlType.class);
+        Class<?> paramType[] = new Class[] {String.class};
+        for(String str : xmltype.propOrder()) {
+            try {
+                String setName = "set" + Character.toUpperCase(str.charAt(0)) + str.subSequence(1, str.length());
+                Method meth = cls.getMethod(setName,paramType );
+                if(meth!=null) {
+                    members.put(str, new Setter<T>(meth) {
+                        public void set(T o, Object t) throws ParseException {
+                            try {
+                                this.meth.invoke(o, t);
+                            } catch (Exception e) {
+                                throw new ParseException(e);
+                            }
+                        }
+                    });
+                }
+            } catch (Exception e) {
+                // oops
+            }
+        }
+    }
+    
+    public static abstract class Setter<O> {
+        protected final Method meth;
+        public Setter(Method meth) {
+            this.meth = meth;
+        }
+        public abstract void set(O o, Object obj) throws ParseException;
+    }
 
-       public static <X> JaxSet<X> get(Class<?> cls) {
-               synchronized(jsets) {
-                       @SuppressWarnings("unchecked")
-                       JaxSet<X> js = (JaxSet<X>)jsets.get(cls);
-                       if(js == null) {
-                               jsets.put(cls, js = new JaxSet<>(cls));
-                       }
-                       return js;
-               }
-       }
+    public static <X> JaxSet<X> get(Class<?> cls) {
+        synchronized(jsets) {
+            @SuppressWarnings("unchecked")
+            JaxSet<X> js = (JaxSet<X>)jsets.get(cls);
+            if(js == null) {
+                jsets.put(cls, js = new JaxSet<>(cls));
+            }
+            return js;
+        }
+    }
 
-       public Setter<T> get(String key) {
-               return members.get(key);
-       }
+    public Setter<T> get(String key) {
+        return members.get(key);
+    }
 }