Package org.jboss.util.loading

Examples of org.jboss.util.loading.Translator


                  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);
View Full Code Here


         // go in reverse order
         ListIterator<Translator> iter = translators.listIterator(translators.size() - 1);
         while(iter.hasPrevious())
         {
            Translator translator = iter.previous();
            // sanity check
            if (translator == null)
            {
               if (trace)
                  log.trace("Null translator, classLoader: " + classLoader);

               continue;
            }

            try
            {
               translator.unregisterClassLoader(classLoader);
            }
            catch (Exception e)
            {
               log.warn("Exception for translator " + translator + " on CL unregister: " + e);
            }
View Full Code Here

      {
         // go in reverse order
         ListIterator<Translator> iter = translators.listIterator(translators.size() - 1);
         while(iter.hasPrevious())
         {
            Translator translator = iter.previous();
            try
            {
               translator.unregisterClassLoader(classLoader);
            }
            catch (Exception e)
            {
               log.warn("Exception for translator " + translator + " on CL unregister: " + e);
            }
View Full Code Here

/* 551 */       String msg = "Invalid use of destroyed classloader, UCL destroyed at:";
/* 552 */       ClassNotFoundException e = new ClassNotFoundException(msg);
/* 553 */       e.initCause(this.unregisterTrace);
/* 554 */       throw e;
/*     */     }
/* 556 */     Translator translator = this.repository.getTranslator();
/* 557 */     if (translator != null)
/*     */     {
/*     */       try
/*     */       {
/* 563 */         URL classUrl = getClassURL(name);
/* 564 */         byte[] rawcode = loadByteCode(classUrl);
/* 565 */         URL codeSourceUrl = getCodeSourceURL(name, classUrl);
/* 566 */         ProtectionDomain pd = getProtectionDomain(codeSourceUrl);
/* 567 */         byte[] bytecode = translator.transform(this, name, null, pd, rawcode);
/*     */
/* 569 */         if (bytecode == null) {
/* 570 */           bytecode = rawcode;
/*     */         }
/* 572 */         definePackage(name);
View Full Code Here

         String msg = "Invalid use of destroyed classloader, UCL destroyed at:";
         ClassNotFoundException e = new ClassNotFoundException(msg);
         e.initCause(this.unregisterTrace);
         throw e;
      }
      Translator translator = repository.getTranslator();
      if (translator != null)
      {
         // Obtain the transformed class bytecode
         try
         {
            // Obtain the raw bytecode from the classpath
            URL classUrl = getClassURL(name);
            byte[] rawcode = loadByteCode(classUrl);
            URL codeSourceUrl = getCodeSourceURL(name, classUrl);
            ProtectionDomain pd = getProtectionDomain(codeSourceUrl);
            byte[] bytecode = translator.transform(this, name, null, pd, rawcode);
            // If there was no transform use the raw bytecode
            if( bytecode == null )
               bytecode = rawcode;
            // Define the class package and instance
            definePackage(name);
View Full Code Here

TOP

Related Classes of org.jboss.util.loading.Translator

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.