Package org.jboss.classloading.spi.metadata

Examples of org.jboss.classloading.spi.metadata.TranslatorScope


            ClassLoaderPolicy policy = clpm.getPolicy();
            ClassLoader cl = unit.getClassLoader();

            for (ClassLoadingTranslatorMetaData cltmd : translators)
            {
               TranslatorScope scope = cltmd.getScope();
               if (scope == null)
                  throw new IllegalArgumentException("Null scope for: " + cltmd);

               String className = cltmd.getClassName();
               Object instance = cl.loadClass(className).newInstance();
               String methodName = cltmd.getMethod();
               Translator translator;
               if (methodName != null)
                  translator = new ReflectionTranslator(instance, methodName);
               else
                  translator = Translator.class.cast(instance);

               scope.addTranslator(system, domain, policy, translator);
               added.put(translator, scope);
            }

            unit.addAttachment(TRANSLATORS_KEY, added);
         }
View Full Code Here

TOP

Related Classes of org.jboss.classloading.spi.metadata.TranslatorScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.