Package jp.ac.kobe_u.cs.prolog.lang

Examples of jp.ac.kobe_u.cs.prolog.lang.PermissionException


      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PrintWriter)) {
      throw new PermissionException(this, "output", "stream", a1, "");
    }
    // print single character
    str = ((SymbolTerm) a2).name();
    if (str.length() != 1) {
      throw new IllegalTypeException(this, 2, "character", a2);
View Full Code Here


      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PrintWriter)) {
      throw new PermissionException(this, "output", "stream", a1, "");
    }
    // print single byte
    ((PrintWriter) stream).print((char) c);
    return cont;
  }
View Full Code Here

      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PrintWriter)) {
      throw new PermissionException(this, "output", "stream", a1, "");
    }
    // print term
    ((PrintWriter) stream).print(a2.dereference().toString());
    return cont;
  }
View Full Code Here

      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PrintWriter)) {
      throw new PermissionException(this, "output", "stream", a1, "");
    }
    // tab
    for (int i = 0; i < n; i++) {
      s += " ";
    }
View Full Code Here

          if (!alias.isSymbol()) {
            throw new IllegalDomainException(this, 2,
                "hash_option", car);
          } else {
            if (engine.getHashManager().containsKey(alias)) {
              throw new PermissionException(this, "new", "hash",
                  car, "");
            }
            engine.getHashManager().put(alias, newHash);
          }
        } else {
View Full Code Here

      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PushbackReader)) {
      throw new PermissionException(this, "input", "stream", a1, "");
    }
    // read line
    try {
      line = new BufferedReader((PushbackReader) stream).readLine();
      if (line == null) { // end_of_stream
View Full Code Here

      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PushbackReader)) {
      throw new PermissionException(this, "input", "stream", a1, "");
    }
    // read single byte
    try {
      int c = ((PushbackReader) stream).read();
      if (c < 0) { // EOF
View Full Code Here

      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PushbackReader)) {
      throw new PermissionException(this, "input", "stream", a1, "");
    }
    // read single byte
    try {
      int c = ((PushbackReader) stream).read();
      if (c < 0) { // EOF
View Full Code Here

      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PushbackReader)) {
      throw new PermissionException(this, "input", "stream", a1, "");
    }
    // read a non-blank single character
    try {
      PushbackReader in = (PushbackReader) stream;
      int c = in.read();
View Full Code Here

      stream = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "stream_or_alias", a1);
    }
    if (!(stream instanceof PrintWriter)) {
      throw new PermissionException(this, "output", "stream", a1, "");
    }
    a2 = a2.dereference();
    if (!a2.isJavaObject()) {
      throw new IllegalTypeException(this, 2, "java", a2);
    }
View Full Code Here

TOP

Related Classes of jp.ac.kobe_u.cs.prolog.lang.PermissionException

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.