Package org.jspresso.framework.util.exception

Examples of org.jspresso.framework.util.exception.NestedRuntimeException


  public Class<? extends E> getComponentContract() {
    if (componentContract == null && getName() != null) {
      try {
        componentContract = Class.forName(getName());
      } catch (ClassNotFoundException ex) {
        throw new NestedRuntimeException(ex);
      }
    }
    return (Class<? extends E>) componentContract;
  }
View Full Code Here


      AbstractPropertyChangeCapable clonedBean = (AbstractPropertyChangeCapable) super
          .clone();
      clonedBean.propertyChangeSupport = null;
      return clonedBean;
    } catch (CloneNotSupportedException ex) {
      throw new NestedRuntimeException(ex);
    }
  }
View Full Code Here

      try {
        String spec = JAR_URL + jarFileUrl.toString() + JAR_URL_SEPARATOR
            + entryPath;
        returnedURL = new URL(spec);
      } catch (MalformedURLException ex) {
        throw new NestedRuntimeException(ex);
      }
    } else if (isClasspathUrl(urlSpec)) {
      String resourcePath = getResourcePathOrUrl(urlSpec, false);
      returnedURL = cl.getResource(resourcePath);
    } else {
      try {
        returnedURL = new URL(urlSpec);
      } catch (MalformedURLException ex) {
        throw new NestedRuntimeException(ex);
      }
    }
    return returnedURL;
  }
View Full Code Here

      // try to invoke the clone method reflectively
      try {
        clonedCollection = (Collection<E>) collection.getClass().getMethod(
            "clone", (Class[]) null).invoke(collection, (Object[]) null);
      } catch (IllegalArgumentException ex) {
        throw new NestedRuntimeException(ex);
      } catch (SecurityException ex) {
        throw new NestedRuntimeException(ex);
      } catch (IllegalAccessException ex) {
        throw new NestedRuntimeException(ex);
      } catch (InvocationTargetException ex) {
        throw new NestedRuntimeException(ex);
      } catch (NoSuchMethodException ex) {
        // Do nothing. the method simply does not exist.
      }
    }
    if (clonedCollection == null) {
View Full Code Here

                        getComponent().getComponentContract()).getValue(
                        getComponent());
                getComponent().firePropertyChange(forwardedProperty,
                    new Object(), newValue);
              } catch (IllegalAccessException ex) {
                throw new NestedRuntimeException(ex);
              } catch (InvocationTargetException ex) {
                throw new NestedRuntimeException(ex);
              } catch (NoSuchMethodException ex) {
                throw new NestedRuntimeException(ex);
              }
            }
          }
        });
  }
View Full Code Here

                    .getAccessorFactory()
                    .createPropertyAccessor(acProp,
                        ((IEntity) value).getComponentContract())
                    .getValue(value);
              } catch (IllegalAccessException ex) {
                throw new NestedRuntimeException(ex, "Invalid property: "
                    + acProp);
              } catch (InvocationTargetException ex) {
                throw new NestedRuntimeException(ex.getTargetException(),
                    "Invalid property: " + acProp);
              } catch (NoSuchMethodException ex) {
                throw new NestedRuntimeException(ex, "Invalid property: "
                    + acProp);
              }
              ((IQueryComponent) actualValue).put(acProp, acPropVaue);
            }
          } else {
View Full Code Here

                customKey.toLowerCase(), customValue);
          }
        }
      } catch (Throwable ex) {
        // This should never happen
        throw new NestedRuntimeException(ex);
      } finally {
        if (rs != null) {
          try {
            rs.close();
          } catch (SQLException ex) {
View Full Code Here

TOP

Related Classes of org.jspresso.framework.util.exception.NestedRuntimeException

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.