Examples of JavaException


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

      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

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

      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

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

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

    } catch (BuiltinException e) {
      e.goal = this;
      e.argNo = 1;
      throw e;
    } catch (ClassCastException e1) {
      throw new JavaException(this, 1, e1);
    }
    tmp = Nil;
    for (int i = list.length - 1; i >= 0; i--) {
      tmp = new ListTerm(list[i], tmp);
    }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaException

                    String faultAction = getAction(faultInfo);
                    if (faultAction == null) {
                        continue;
                    }

                    JavaException exceptionClass = getExceptionClass(method, faultInfo);                   
                    if (!StringUtils.isEmpty(exceptionClass.getPackageName())
                        && !exceptionClass.getPackageName().equals(intf.getPackageName())) {
                        intf.addImport(exceptionClass.getClassName());
                    }                   

                    JAnnotation faultAnnotation = new JAnnotation(FaultAction.class);
                    faultAnnotation.addElement(new JAnnotationElement("className", exceptionClass));
                    faultAnnotation.addElement(new JAnnotationElement("value",
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaException

                    String faultAction = getAction(faultInfo);
                    if (faultAction == null) {
                        continue;
                    }

                    JavaException exceptionClass = getExceptionClass(method, faultInfo);                   
                    if (!StringUtils.isEmpty(exceptionClass.getPackageName())
                        && !exceptionClass.getPackageName().equals(intf.getPackageName())) {
                        intf.addImport(exceptionClass.getClassName());
                    }                   

                    JAnnotation faultAnnotation = new JAnnotation(FaultAction.class);
                    faultAnnotation.addElement(new JAnnotationElement("className", exceptionClass));
                    faultAnnotation.addElement(new JAnnotationElement("value",
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaException

        String fullClassName = packageName + "." + name;
        collector.addExceptionClassName(packageName, name, fullClassName);

        boolean samePackage = method.getInterface().getPackageName().equals(packageName);
        method.addException(new JavaException(faultMessage.getName().getLocalPart(),
                                              samePackage ? name : fullClassName, namespace));

        List<MessagePartInfo> faultParts = faultMessage.getMessageParts();

        JavaExceptionClass expClass = new JavaExceptionClass(model);
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaException

        String fullClassName = packageName + "." + name;
        collector.addExceptionClassName(packageName, name, fullClassName);

        boolean samePackage = method.getInterface().getPackageName().equals(packageName);
        method.addException(new JavaException(name, samePackage ? name : fullClassName, namespace));

        List<MessagePartInfo> faultParts = faultMessage.getMessageParts();

        JavaExceptionClass expClass = new JavaExceptionClass(model);
        expClass.setName(name);
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaException

                jp.setName("arg" + i++);
                jm.addParameter(jp);
            }

            for (Type type : m.getGenericExceptionTypes()) {
                JavaException jex = new JavaException();
                String className = getClassName(type);
                jex.setClassName(className);
                jex.setName(className);
                jm.addException(jex);
            }

            JavaReturn jreturn = new JavaReturn();
            jreturn.setClassName(getClassName(m.getGenericReturnType()));
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaException

                jp.setName("arg" + i++);
                jm.addParameter(jp);
            }

            for (Type type : m.getGenericExceptionTypes()) {
                JavaException jex = new JavaException();
                String className = getClassName(type);
                jex.setClassName(className);
                jex.setName(className);
                jm.addException(jex);
            }

            JavaReturn jreturn = new JavaReturn();
            jreturn.setClassName(getClassName(m.getGenericReturnType()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.