Package org.crsh.lang.spi

Examples of org.crsh.lang.spi.Language


  @Override
  public void init() {
    try {
      Class<Language> mgrClass = (Class<Language>)getClass().getClassLoader().loadClass(className);
      Constructor<Language> mgrCtor = mgrClass.getConstructor(PluginContext.class);
      Language mgr = mgrCtor.newInstance(getContext());
      real.set(mgr);
    }
    catch (Exception e) {
      log.info("Plugin is inactive");
    }
View Full Code Here


    return real.get() != null;
  }

  @Override
  public Repl getRepl() {
    Language lang = real.get();
    if (lang != null) {
      return lang.getRepl();
    } else {
      throw new IllegalStateException(name + " language is not available");
    }
  }
View Full Code Here

    }
  }

  @Override
  public Compiler getCompiler() {
    Language lang = real.get();
    if (lang != null) {
      return lang.getCompiler();
    } else {
      throw new IllegalStateException(name + " language is not available");
    }
  }
View Full Code Here

    }
  }

  @Override
  public void init(ShellSession session) {
    Language lang = real.get();
    if (lang != null) {
      lang.init(session);
    } else {
      throw new IllegalStateException(name + " language is not available");
    }
  }
View Full Code Here

    }
  }

  @Override
  public void destroy(ShellSession session) {
    Language lang = real.get();
    if (lang != null) {
      lang.destroy(session);
    } else {
      throw new IllegalStateException(name + " language is not available");
    }
  }
View Full Code Here

TOP

Related Classes of org.crsh.lang.spi.Language

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.