Package jfun.yan.xml

Examples of jfun.yan.xml.ConfigurationException


    if(type!=null){
      try{
        type.getMethod(mname, null);
      }
      catch(NoSuchMethodException e){
        throw new ConfigurationException("lifecycle method "
            + mname + " not defined by "+ Misc.getTypeName(type),
            loc);
      }
    }
  }
View Full Code Here


      public Object map(Object obj){
        try{
          return nut.convert(elem_type, obj);
        }
        catch(ConfigurationException e){
          throw new ConfigurationException(
              e.getMessage() + ": "+ c, e, e.getLocation());
        }
      }
      public String toString(){
        return c.toString();
View Full Code Here

          final BinderNut nut = (BinderNut)obj;
          try{
            return nut.eval();
          }
          catch(Exception e){
            throw new ConfigurationException(e, nut.getTagLocation());
          }
        }
        public Class getType(){
          return Binder.class;
        }
      };
    }
    else{
      try{
        final Method mtd = type.getMethod("eval", null);
        final Class rtype = mtd.getReturnType();
        return new Evaluator(){
          public Object eval(Object obj){
            final Nut nut = (Nut)obj;
            try{
              final Object r = mtd.invoke(nut, null);
              if(void.class.equals(rtype)){
                return nut;
              }
              else return r;
            }
            catch(InvocationTargetException e){
              throw new ConfigurationException(e.getTargetException(), nut.getTagLocation());
            }
            catch(Exception e){
              throw new ConfigurationException(e, nut.getTagLocation());
            }
          }
          public Class getType(){
            return (void.class.equals(rtype)?type:rtype);
          }
View Full Code Here

      return NutsUtils.getClassLoader(getClass().getClassLoader(),
          classpath,
          env.getBaseDir());
    }
    catch(MalformedURLException e){
      throw new ConfigurationException("invalid classpath",
          loc);
    }
  }
View Full Code Here

   * @return This method never returns. The return type is for
   * callers to get around of the type system so that you can say
   * "throw raise(...)".
   */
  public ConfigurationException raise(String msg){
    throw new ConfigurationException(tagname+": " + msg, loc);
  }
View Full Code Here

   * @return This method never returns. The return type is for
   * callers to get around of the type system so that you can say
   * "throw raise(...)".
   */
  public ConfigurationException raise(Throwable e){
    throw new ConfigurationException(tagname+": " + e.getMessage(), e, loc);
  }
View Full Code Here

TOP

Related Classes of jfun.yan.xml.ConfigurationException

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.