Package l2p.extensions.scripts.Compiler

Examples of l2p.extensions.scripts.Compiler.MemoryClassLoader


    {
      GArray<File> scriptFiles = new GArray<File>();
      parseClasses(new File(Config.DATAPACK_ROOT, "data/scripts"), scriptFiles);
      if(Compiler.getInstance().compile(scriptFiles, System.out))
      {
        MemoryClassLoader classLoader = Compiler.getInstance().classLoader; //TODO
        for(String name : classLoader.byteCodes.keySet())
        {
          if(name.contains("$"))
          {
            continue;
          } // пропускаем вложенные классы
          try
          {
            c = classLoader.loadClass(name);
            Script s = new Script(c);
            _classes.put(name, s);
          }
          catch(ClassNotFoundException e)
          {
View Full Code Here


  {
    GArray<File> scriptFiles = new GArray<File>();
    parseClasses(f, scriptFiles);
    if(Compiler.getInstance().compile(scriptFiles, System.out))
    {
      MemoryClassLoader classLoader = Compiler.getInstance().classLoader;
      Class<?> c;
      for(String name : classLoader.byteCodes.keySet())
      {
        if(name.contains("$"))
        {
          continue;
        } // пропускаем вложенные классы
        try
        {
          c = classLoader.loadClass(name);
          Script s = new Script(c);
          ScriptObject oldSo = GameServer.scriptsObjects.remove(name);
          if(oldSo != null)
          {
            oldSo.invokeMethod("onReload");
View Full Code Here

  private boolean reloadClassByName(String name)
  {
    if(Compiler.getInstance().compile(new File(Config.DATAPACK_ROOT, "data/scripts/" + name.replace(".", "/") + ".java"), System.out))
    {
      MemoryClassLoader classLoader = Compiler.getInstance().classLoader;
      try
      {
        Class<?> c = classLoader.loadClass(name);
        Script s = new Script(c);
        ScriptObject oldSo = GameServer.scriptsObjects.remove(name);
        if(oldSo != null)
        {
          oldSo.invokeMethod("onReload");
View Full Code Here

TOP

Related Classes of l2p.extensions.scripts.Compiler.MemoryClassLoader

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.