Package com.jclark.xsl.om

Examples of com.jclark.xsl.om.XSLException


                public void append(Result result) throws XSLException {
                    if (result instanceof ResultBase) {
                        ((ResultBase)result).resultTreeFragment(frag);
                    } else {
                        // FIXME
                        throw new XSLException("weird result tree fragment usage not implemented");
                    }
                }
            };
    }
View Full Code Here


                    && (Modifier.isStatic(methods[i].getModifiers())
                        ? methods[i].getParameterTypes().length == args.length
                        : (!mustBeStatic
                           && methods[i].getParameterTypes().length == args.length - 1))) {
                    if (method != null)
                        throw new XSLException(name + ": overloaded method");
                    method = methods[i];
                }
            }
            if (method == null) {
                throw new XSLException(name + ": no method with " +
                                       args.length + " arguments");
            }
            Object result;
            if (Modifier.isStatic(method.getModifiers()))
                result = method.invoke(null, args);
View Full Code Here

            Constructor[] constructors = cls.getConstructors();
            Constructor constructor = null;
            for (int i = 0; i < constructors.length; i++) {
                if (constructors[i].getParameterTypes().length == args.length) {
                    if (constructor != null)
                        throw new XSLException("overloaded constructor");
                    constructor = constructors[i];
                }
            }
            if (constructor == null)
                throw new XSLException("no constructor with " + args.length + " arguments");
            return constructor.newInstance(args);
        }
View Full Code Here

                    return callConstructor(args);
                else
                    return callMethod(name, args);
            }
            catch (IllegalAccessException e) {
                throw new XSLException(name + ": illegal access");
            }
            catch (IllegalArgumentException e) {
                throw new XSLException(name + ": illegal arguments");
            }
            catch (InstantiationException e) {
                throw new XSLException("cannot instantiate class");
            }
            catch (InvocationTargetException e) {
                Throwable t = e.getTargetException();
                if (t instanceof RuntimeException)
                    throw (RuntimeException)t;
                if (t instanceof Error)
                    throw (Error)t;
                if (t instanceof Exception)
                    throw new XSLException((Exception)t);
                throw new XSLException(e);
            }
        }
View Full Code Here

    _highlightCounter = 0;
    try {
      _output.write(Start);
    }
    catch (IOException e) {
      throw new XSLException(e);
    }
  }
View Full Code Here

      _output.write(End);
      _output.flush();
      _output.close();
    }
    catch (IOException e) {
      throw new XSLException(e);
    }
  }
View Full Code Here

    _output.write(tagBytes);
    _openStartTag = true;
  }
      }
      catch (IOException e) {
  throw new XSLException(e);
      }
  }
View Full Code Here

    ;
      else      // cached in startElement
  _output.write((byte[])EndTags.get(elementType));
    }
    catch (IOException e) {
      throw new XSLException(e);
    }
  }
View Full Code Here

      _output.write(attr);
      _output.write(value.getBytes());
      _output.write('"');
    }
    catch (IOException e) {
      throw new XSLException(e);
    }
  }
View Full Code Here

    try {
      flushStartTag();
      _output.write(str.getBytes());
    }
    catch (IOException e) {
      throw new XSLException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.jclark.xsl.om.XSLException

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.