Examples of ZussException


Examples of org.zkoss.zuss.ZussException

    _parent = parent;
  }

  @Override
  public void appendChild(NodeInfo child) {
    throw new ZussException(this+" does not allow any children");
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

  String filename, int lineno) {
    int j = clsnm.lastIndexOf('#');
    if (j >= 0) {
      mtdnm = clsnm.substring(j + 1);
      if (mtdnm.length() == 0)
        throw new ZussException("a method name required after #", filename, lineno);
      clsnm = clsnm.substring(0, j);
      if (clsnm.length() == 0)
        throw new ZussException("a class name required before #", filename, lineno);
    }

    Class<?> cls = getClass(clsnm, filename, lineno);
    Class<?>[] argTypes = new Class<?>[argc];
    for (j = argTypes.length; --j >= 0;)
      argTypes[j] = String.class;

    try {
      final Method m = getMethodInPublic(cls, mtdnm, argTypes, filename, lineno);
      if ((m.getModifiers() & Modifier.STATIC) == 0)
        throw new ZussException("not a static method: "+m, filename, lineno);
      return m;
    } catch (NoSuchMethodException ex) { //ignore
    }

    final Method[] ms = cls.getMethods();
    for (j = ms.length; --j >= 0;)
      if (mtdnm.equals(ms[j].getName())) {
        argTypes = ms[j].getParameterTypes();
        if (argTypes.length == argc)
          try {
            return getMethodInPublic(cls, mtdnm, argTypes, filename, lineno);
          } catch (NoSuchMethodException ex) { //ignore
          }
      }
    throw new ZussException("method not found, "+mtdnm+", in "+cls, filename, lineno);
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

    final Class<?> basecls = cls.getSuperclass();
    if (basecls != null)
      return getMethodInPublic(basecls, mtdnm, argTypes, filename, lineno);

    throw new ZussException("public method required: "+m, filename, lineno);
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

      } catch (ClassNotFoundException ex) { //ignore and try the other
      }
    try {
      return Parser.class.forName(clsnm);
    } catch (ClassNotFoundException ex) {
      throw new ZussException("class not found, "+clsnm, filename, lineno);
    }
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

   */
  public String getFilename() {
    return _in.getFilename();
  }
  private ZussException error(String msg, Token token) {
    return new ZussException(msg, getFilename(), getLine(token));
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

  }
  private ZussException error(String msg, Token token) {
    return new ZussException(msg, getFilename(), getLine(token));
  }
  private ZussException error(String msg, int lineno) {
    return new ZussException(msg, getFilename(), lineno);
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

  public String getFilename() {
    return _filename;
  }

  private ZussException error(String msg, int lineno) {
    return new ZussException(msg, getFilename(), lineno);
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

      }
    }
  }

  private ZussException error(String msg, NodeInfo node) {
    return new ZussException(msg, _zuss.getFilename(), node.getLine());
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

  private ZussException error(String msg, NodeInfo node) {
    return new ZussException(msg, _zuss.getFilename(), node.getLine());
  }
  private ZussException error(String msg, int lineno) {
    return new ZussException(msg, _zuss.getFilename(), lineno);
  }
View Full Code Here

Examples of org.zkoss.zuss.ZussException

  }
  private ZussException error(String msg, int lineno) {
    return new ZussException(msg, _zuss.getFilename(), lineno);
  }
  private ZussException error(String msg, int lineno, Throwable t) {
    return new ZussException(msg, _zuss.getFilename(), lineno, t);
  }
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.