Package javassist

Examples of javassist.CannotCompileException



    } catch (IOException e) {
      log.fatal("IO");
      e.printStackTrace();
      throw new CannotCompileException(cfgFile,e);
    } catch (SAXException e) {
      log.fatal("SAX");
      e.printStackTrace();
      throw new CannotCompileException(cfgFile,e);
    } catch (ParserConfigurationException e) {
      log.fatal("PCE");
      e.printStackTrace();
      throw new CannotCompileException(cfgFile,e);
    } catch (FactoryConfigurationError e) {
      log.fatal("FCE");
      e.printStackTrace();
      throw new CannotCompileException(cfgFile,e);
    }
   
    try {
      theTranslator.start(thePool);
    } catch (NotFoundException e) {
      log.fatal("NFE");
      e.printStackTrace();
      throw new CannotCompileException(cfgFile,e);
    }

    initialized = true;
   
    log.info("Translator initialized successfully");
View Full Code Here


    // che qualcuno ha chiamato la getGlobalInstance passando null E
    // non era ancora stata creata una istanza del Monitor. Questo e'
    // sintomo di errore, quindi fermo tutto!
    if (cfg == null) {
      logger.fatal("Monitor.getGlobalInstance called for the first time with null parameter! FATAL ERROR!");
      throw new CannotCompileException("Monitor.getGlobalInstance called for the first time with null parameter! FATAL ERROR!");
    }
   
    theLoader = thaLoader;

    try {
      cfgFile = SystemEnvironmentVariables.getEnvironmentVariable("JAFIMON_HOME") + File.separator + "data" + File.separator + "configurations" + File.separator + cfg.getName();
    } catch (IOException e1) {
      throw new CannotCompileException(cfgFile,e1);
    }
   
    // Ora effettuo il parsing della configurazione ed inizializzo
    // gli oggetti necessari
    theTranslator = new CustomTranslator();

    SAXParser parser;
    ConfigurationSAXParser ch = new ConfigurationSAXParser(theTranslator,thePool);
    try {
      parser = SAXParserFactory.newInstance().newSAXParser();
      parser.parse(cfgFile, ch);

    } catch (ParserConfigurationException e1) {
      throw new CannotCompileException(cfgFile,e1);

    } catch (SAXException e1) {
      throw new CannotCompileException(cfgFile,e1);

    } catch (FactoryConfigurationError e1) {
      throw new CannotCompileException(cfgFile,e1);

    } catch (IOException e) {
      throw new CannotCompileException(cfgFile,e);
    }
   
    theLoader.addTranslator(thePool, theTranslator)// Chiama xlat.start()
  }
View Full Code Here

          int pos = iter.next();
          pos = transformInvokevirtualsIntoGetfields(classfile, iter, pos);
          pos = transformInvokevirtualsIntoPutfields(classfile, iter, pos);

        } catch (BadBytecode e) {
          throw new CannotCompileException(e);
        }
      }
    }
  }
View Full Code Here

            if (edited)
                minfo.rebuildStackMapIf6(clazz.getClassPool(),
                                         clazz.getClassFile2());
        }
        catch (BadBytecode b) {
            throw new CannotCompileException(b.getMessage(), b);
        }

        return edited;
    }
View Full Code Here

            }
            else
                return false;
        }
        catch (BadBytecode e) {
            throw new CannotCompileException(e);
        }
    }
View Full Code Here

                MethodInfo minfo = (MethodInfo)list.get(i);
                minfo.setSuperclass(superclass);
            }
        }
        catch (BadBytecode e) {
            throw new CannotCompileException(e);
        }
        cachedSuperclass = superclass;
    }
View Full Code Here

        try {
            byte[] data = new NewRemover(this.get(), where).doit();
            this.set(data);
        }
        catch (BadBytecode e) {
            throw new CannotCompileException("bad stack map table", e);
        }
    }
View Full Code Here

          int pos = iter.next();
          pos = transformInvokevirtualsIntoGetfields(classfile, iter, pos);
          pos = transformInvokevirtualsIntoPutfields(classfile, iter, pos);

        } catch (BadBytecode e) {
          throw new CannotCompileException(e);
        }
      }
    }
  }
View Full Code Here

            superName = superClass.getName();
            classname = superName;
        }

        if (Modifier.isFinal(superClass.getModifiers()))
            throw new CannotCompileException(superName + " is final");

        classname = makeProxyName(classname);
        if (classname.startsWith("java."))
            classname = "org.javassist.tmp." + classname;
View Full Code Here

            diag = "END";
        }
        catch (ClassNotFoundException ex)
        {
            throw new CannotCompileException(ex);
        }
        finally
        {
            _log.debug(String.format("%5s onLoad %s", diag, classname));
        }
View Full Code Here

TOP

Related Classes of javassist.CannotCompileException

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.