Package org.kite9.framework.common

Examples of org.kite9.framework.common.Kite9ProcessingException


        ParameterizedType pt = (ParameterizedType) to;
        Type raw = pt.getRawType();
        Type[] args = pt.getActualTypeArguments();
        if ((raw instanceof Class<?>) && (Iterable.class.isAssignableFrom((Class<?>) raw))) {
          if (args.length != 1) {
            throw new Kite9ProcessingException(
                "Could not handle collection with more than one type argument: " + to);
          } else {
            NounPart np = generateNoun(args[0], a);
            String label = a.getObjectAlias(raw) + " of ";
            return new AnnotatedNounPartImpl(np, label);
View Full Code Here


        u.unravel(t, a, out);
        return;
      }
    }

    throw new Kite9ProcessingException("Can't handle: " + t);
  }
View Full Code Here

      }

      return userClassLoader;
    } catch (MalformedURLException e) {
      throw new Kite9ProcessingException("Could not set up class loader for user's classpath: ", e);
    }
  }
View Full Code Here

      String name = className.replace("/", ".");
      Class<?> c = cl.loadClass(name);

      return c;
    } catch (ClassNotFoundException e) {
      throw new Kite9ProcessingException("Could not load class: ", e);
    }
  }
View Full Code Here

      try {
        Class<?> c = hydrateClass(classInPackage, cl);
        out = c.getPackage();

        if (out == null) {
          throw new Kite9ProcessingException("Hydrated " + classInPackage + " but package " + name
              + " still not available");
        }

      } catch (Exception e) {
        throw new Kite9ProcessingException("Couldn't instantiate package object for: " + name, e);
      }

    }
    return out;
  }
View Full Code Here

    Class<?> c = hydrateClass(method.getClassName(), cl);
    Class<?>[] params = hydrateParams(args, cl);
    Method m = getDeclaredMethod(method.getName(), c, params, cl);

    if (m == null) {
      throw new Kite9ProcessingException("Could not find method: " + method.getName());
    }
    return m;

  }
View Full Code Here

      Class<?> c = hydrateClass(con.getClassName(), cl);
      Class<?>[] params = hydrateParams(args, cl);
      Constructor<?> co = c.getDeclaredConstructor(params);
      return co;
    } catch (NoSuchMethodException e) {
      throw new Kite9ProcessingException("Could not find constructor: ", e);
    }
  }
View Full Code Here

    try {
      Class<?> c = hydrateClass(field.getClassName(), cl);
      Field f = c.getDeclaredField(field.getName());
      return f;
    } catch (NoSuchFieldException e) {
      throw new Kite9ProcessingException("Could not find field: ", e);
    }
  }
View Full Code Here

    } else if (t instanceof GenericArrayType) {
      return "array of " + getAlias(((GenericArrayType) t).getGenericComponentType());
    } else if (t instanceof TypeVariable<?>) {
      return t.toString();
    } else {
      throw new Kite9ProcessingException("Not handled yet");
    }
  }
View Full Code Here

    if (t instanceof Class<?>) {
      return getStereotype((Class<?>) t);
    } else if (t instanceof ParameterizedType) {
      return getStereotype((Class<?>) ((ParameterizedType) t).getRawType());
    } else {
      throw new Kite9ProcessingException("Not handled yet");
    }
  }
View Full Code Here

TOP

Related Classes of org.kite9.framework.common.Kite9ProcessingException

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.