Package anvil.script.compiler

Examples of anvil.script.compiler.CompiledModule


  public boolean loadClass()
  {
    if (_script2 != null) {
      return true;
    }
    CompiledModule script = doLoadClass();
    if (script != null) {
      _script1 = null;
      _script2 = script;
      return true;
    } else {
View Full Code Here


  {
    String classname = getClassname();
    try {
      ZoneClassLoader clsldr = _address.getZone().getClassLoader();
      Class cls = clsldr.loadClass(classname);
      CompiledModule script = (CompiledModule)cls.newInstance();
      classname   = cls.getName();
      _descriptor = classname.replace('.', '/');
      _version    = script.getVersion();
      script.init(_address);
      _address.getZone().log().info("code loaded: " + classname + ", version "+_version);
      return script;
    } catch (NoClassDefFoundError exception) {
      //ignore
    } catch (ClassNotFoundException exception) {
View Full Code Here

      if (_initialized) {
        return;
      }
      _initialized = true;
    }
    CompiledModule script = _script2;
    if (script != null) {
      Context context = new Context(_address.getZone());
      context.push(script, null, 0, 0, false);
      try {
        script.init(context);
      } catch (ScriptException e) {
        _initialized = false;
        //e.fillInStackTrace();
        listener.error(new anvil.Location(_address.getURL()), e.getData().toString());
      } catch (Throwable t) {
        listener.error(null, t);
        anvil.Log.log().error("Initialization failed: "+script.getPathinfo(), t);
        _initialized = false;
      } finally {
        context.pop();
        context.destroy();
      }
View Full Code Here

TOP

Related Classes of anvil.script.compiler.CompiledModule

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.