@@ -0,0 +1,2534 @@
+import java.io.BufferedReader;%0Aimport java.io.FileReader;%0Aimport java.lang.reflect.Method;%0Aimport java.util.HashMap;%0Aimport java.util.HashSet;%0Aimport java.util.Map;%0Aimport java.util.Set;%0A%0A/**%0A *%0A */%0Apublic class Platform %7B%0A%0A    private static Platform instance;%0A    private static Map%3CString, Object%3E extensions;%0A    private static Set%3CDescription%3E descriptions;%0A%0A    private Platform() %7B%7D%0A%0A    public Object loadExtension(Description description) throws Exception %7B%0A        if (extensions == null)%0A            extensions = new HashMap%3CString, Object%3E();%0A        else if (extensions.containsKey(description.getName())) %7B%0A            return extensions.get(description.getName());%0A        %7D%0A%0A        Class%3C?%3E afficheurClass = Class.forName(description.getName());%0A        Object extension = afficheurClass.newInstance();%0A%0A        return extension;%0A    %7D%0A%0A    public static Set%3CDescription%3E getDescriptions() throws Exception %7B%0A        if(descriptions == null) %7B%0A            descriptions = new HashSet%3CDescription%3E();%0A%0A            BufferedReader br = new BufferedReader(new FileReader(%22afficheur.txt%22));%0A%0A            String line;%0A            Description description = new Description();%0A            while ((line = br.readLine()) != null) %7B%0A                if (line.isEmpty()) %7B%0A                    if (description.getName() != null) %7B%0A                        descriptions.add(description);%0A                    %7D%0A%0A                    description = new Description();%0A                %7D%0A%0A                String split%5B%5D = line.split(%22 = %22);%0A                String key = split%5B0%5D;%0A                String value = split%5B1%5D;%0A%0A                for (Method m : Description.class.getMethods()) %7B%0A                    if (m.getName().equals(%22set%22 + key)) %7B%0A                        Class%3C?%3E parameterType = m.getParameterTypes()%5B0%5D;%0A                        if (parameterType.equals(String.class)) %7B%0A                            m.invoke(description, value);%0A                        %7D else if (parameterType.equals(Boolean.class)) %7B%0A                            m.invoke(description, Boolean.parseBoolean(value));%0A                        %7D else %7B%0A                            throw new Exception(%22unknown parameter type: %22 + parameterType.getName());%0A                        %7D%0A%0A                        break;%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A%0A        return descriptions;%0A    %7D%0A%0A    public static Platform getInstance() %7B%0A        if (instance == null)%0A            instance = new Platform();%0A%0A        return instance;%0A    %7D%0A%7D%0A

add platform