Package scriptingLanguage.variables

Examples of scriptingLanguage.variables.JavaMethod


    JavaClass<Parser> parserClass = new JavaClass<>("Parser", Parser.class);
    variables.put("parser", new Pair<AbstractClass<?>, Token>(parserClass, new Token(new JavaObject<>(parserClass, parser), Interpreter.variableType)));
    try {
      JavaClass<Method> methodClass = new JavaClass<>("Method", Method.class);
      variables.put("print:{Object}", new Pair<AbstractClass<?>, Token>(methodClass,
          new Token(new JavaMethod(JavaMethodClass.make(Interpreter.voidClass, Interpreter.ObjectClass), System.out.getClass().getMethod("print", Object.class), System.out, this), methodClass.getTokenType())));
      variables.put("println:{Object}", new Pair<AbstractClass<?>, Token>(methodClass,
          new Token(new JavaMethod(JavaMethodClass.make(Interpreter.voidClass, Interpreter.ObjectClass), System.out.getClass().getMethod("println", Object.class), System.out, this), methodClass.getTokenType())));
    }
    catch (NoSuchMethodException | SecurityException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of scriptingLanguage.variables.JavaMethod

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.