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

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


      if (!a3.unify(toPrologTerm(value), engine.trail)) {
        return engine.fail();
      }
      return cont;
    } catch (ClassNotFoundException e) { // Class.forName
      throw new JavaException(this, 1, e);
    } catch (NoSuchFieldException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (SecurityException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (NullPointerException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (IllegalAccessException e) { // Field.get(..)
      throw new JavaException(this, 2, e);
    } catch (IllegalArgumentException e) { // Field.get(..)
      throw new JavaException(this, 2, e);
    }
  }
View Full Code Here


      if (!a3.unify(toPrologTerm(value), engine.trail)) {
        return engine.fail();
      }
      return cont;
    } catch (ClassNotFoundException e) { // Class.forName
      throw new JavaException(this, 1, e);
    } catch (NoSuchMethodException e) { // Class.getDeclaredMethod
      throw new JavaException(this, 2, e);
    } catch (SecurityException e) { // Class.getDeclaredMethods
      throw new JavaException(this, 2, e);
    } catch (IllegalAccessException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    } catch (IllegalArgumentException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    } catch (InvocationTargetException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    } catch (NullPointerException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    }
  }
View Full Code Here

      if (!a2.unify(toPrologTerm(instance), engine.trail)) {
        return engine.fail();
      }
      return cont;
    } catch (ClassNotFoundException e) { // Class.forName(..)
      throw new JavaException(this, 1, e);
    } catch (InstantiationException e) { // Class.forName(..) or
      // Constructor.newInstance()
      throw new JavaException(this, 1, e);
    } catch (IllegalAccessException e) { // Class.forName(..) or
      // Constructor.newInstance()
      throw new JavaException(this, 1, e);
    } catch (NoSuchMethodException e) { // Class.getDeclaredConstructor()
      throw new JavaException(this, 1, e);
    } catch (SecurityException e) { // Class.getDeclaredConstructors()
      throw new JavaException(this, 1, e);
    } catch (IllegalArgumentException e) { // Constructor.newInstance()
      throw new JavaException(this, 1, e);
    } catch (InvocationTargetException e) { // Constructor.newInstance()
      throw new JavaException(this, 1, e);
    }
  }
View Full Code Here

      throw new PInstantiationException(this, 1);
    }
    try {
      Arrays.sort(list);
    } catch (ClassCastException e) {
      throw new JavaException(this, 1, e);
    }
    tmp = Nil;
    tmp2 = null;
    for (int i = list.length - 1; i >= 0; i--) {
      if (!list[i].equals(tmp2)) {
View Full Code Here

      if (!a3.unify(toPrologTerm(value), engine.trail)) {
        return engine.fail();
      }
      return cont;
    } catch (ClassNotFoundException e) { // Class.forName
      throw new JavaException(this, 1, e);
    } catch (NoSuchMethodException e) { // Class.getDeclaredMethod
      throw new JavaException(this, 2, e);
    } catch (SecurityException e) { // Class.getDeclaredMethods
      throw new JavaException(this, 2, e);
    } catch (IllegalAccessException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    } catch (IllegalArgumentException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    } catch (InvocationTargetException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    } catch (NullPointerException e) { // Method.invoke
      throw new JavaException(this, 2, e);
    }
  }
View Full Code Here

        value = a3;
      }
      field.set(instance, value);
      return cont;
    } catch (ClassNotFoundException e) { // Class.forName
      throw new JavaException(this, 1, e);
    } catch (NoSuchFieldException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (SecurityException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (NullPointerException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (IllegalAccessException e) { // Field.get(..)
      throw new JavaException(this, 2, e);
    } catch (IllegalArgumentException e) { // Field.get(..)
      throw new JavaException(this, 2, e);
    }
  }
View Full Code Here

      }
      field.setAccessible(true);
      field.set(instance, value);
      return cont;
    } catch (ClassNotFoundException e) { // Class.forName
      throw new JavaException(this, 1, e);
    } catch (NoSuchFieldException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (SecurityException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (NullPointerException e) { // Class.getField(..)
      throw new JavaException(this, 2, e);
    } catch (IllegalAccessException e) { // Field.get(..)
      throw new JavaException(this, 2, e);
    } catch (IllegalArgumentException e) { // Field.get(..)
      throw new JavaException(this, 2, e);
    }
  }
View Full Code Here

      default:
        token = SymbolTerm.makeSymbol(s.toString());
        break;
      }
    } catch (Exception e) {
      throw new JavaException(this, 1, e);
    }
    if (!a2.unify(new IntegerTerm(type), engine.trail)) {
      return engine.fail();
    }
    if (!a3.unify(token, engine.trail)) {
View Full Code Here

      engine.setException(engine.copy(e.getMessageTerm()));
      engine.cut(B);
      return engine.fail();
    } catch (Exception e) {
      if (outOfScope) {
        throw new JavaException(e);
      }
      engine.setException(new JavaObjectTerm(e));
      engine.cut(B);
      return engine.fail();
    }
View Full Code Here

      if (!a2.unify(toPrologTerm(instance), engine.trail)) {
        return engine.fail();
      }
      return cont;
    } catch (ClassNotFoundException e) { // Class.forName(..)
      throw new JavaException(this, 1, e);
    } catch (InstantiationException e) { // Class.forName(..) or
      // Constructor.newInstance()
      throw new JavaException(this, 1, e);
    } catch (IllegalAccessException e) { // Class.forName(..) or
      // Constructor.newInstance()
      throw new JavaException(this, 1, e);
    } catch (SecurityException e) { // Class.getConstructors()
      throw new JavaException(this, 1, e);
    } catch (IllegalArgumentException e) { // Constructor.newInstance()
      throw new JavaException(this, 1, e);
    }
  }
View Full Code Here

TOP

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

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.