Package com.inspiresoftware.lib.dto.geda.exception

Examples of com.inspiresoftware.lib.dto.geda.exception.GeDARuntimeException


      for (int i = 0; i < declIs.length; i++) {
        if (declaringClassIsValid(declIs[i], method)) {
          return declIs[i];
        }
      }
      throw new GeDARuntimeException("Unable to identify interface for proxy object");
    }
    if (declaringClassIsValid(declS, method)) {
      return declS;
    }
    final Class< ? >[] declIs = decl.getInterfaces();
    for (int i = 0; i < declIs.length; i++) {
      if (declaringClassIsValid(declIs[i], method)) {
        return declIs[i];
      }
    }
    throw new GeDARuntimeException("Unable to identify interface for proxy object");
  }
View Full Code Here


        if (readMethod == null) {
            throw new InspectionPropertyNotFoundException("No read method for: ", descriptor.getName());
        }
    final Class< ? > target = getValidDeclaringClass(readMethod);
    if ((target.getModifiers() & PUBLIC) == 0) {
      throw new GeDARuntimeException(target.getCanonicalName()
          + " does not have [public] modifier. This will cause IllegalAccessError during runtime.");
    }
  }
View Full Code Here

                return new ReturnTypeContext(rcl,
                        PRIMITIVE_TO_WRAPPER.get(rcl.getCanonicalName()), rcl.getCanonicalName());
            }
            return new ReturnTypeContext(rcl, rcl.getCanonicalName(), null);
        } catch (GeDARuntimeException gre) {
            throw new GeDARuntimeException("Unable to determine correct return type from getter method in class: " + readerClassName, gre);
        }
  }
View Full Code Here

        if (writeMethod == null) {
            throw new InspectionPropertyNotFoundException("No write method for: ", descriptor.getName());
        }
    final Class< ? > target = getValidDeclaringClass(writeMethod);
    if ((target.getModifiers() & PUBLIC) == 0) {
      throw new GeDARuntimeException(target.getCanonicalName()
          + " does not have [public] modifier. This will cause IllegalAccessError during runtime.");
    }

  }
View Full Code Here

   * Class loader reference.
   */
  protected ClassLoader getClassLoader() {
        ClassLoader cl = loader.get();
        if (cl == null) { // Cl was garbage collected - something gone really wrong
            throw new GeDARuntimeException("Class loader has been gc'ed");
        }
    return cl;
  }
View Full Code Here

        if (candidateRead != null) {
            if (candidateWrite != null) {
                try {
                    return new PropertyDescriptor(candidateRead.getName(), candidateRead.getReadMethod(), candidateWrite.getWriteMethod());
                } catch (IntrospectionException iexp) {
                    throw new GeDARuntimeException(
                            "Unable to combine get and set for [" + entityClass + "#" + binding
                                    + "] from different interfaces into single property descriptor"
                    );
                }
            }
View Full Code Here

            final Object[] bounds = ((TypeVariable) type).getBounds();
            if (bounds != null && bounds.length > 0 && bounds[0] instanceof Class) {
                return (Class) bounds[0]; // variable generics  (e.g. T getMyClass())
            }
        }
        throw new GeDARuntimeException("Unable to determine correct class for type: " + type);
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    public DtoContext has(final Class dtoClass) {
        if (dtoClass == null) {
            throw new GeDARuntimeException("dtoClass must not be null");
        }
        final int hash = dtoClass.hashCode();
        if (contexts.containsKey(hash)) {
            return contexts.get(hash);
        }
View Full Code Here

    }

    /** {@inheritDoc} */
    public DtoContext dto(final Class dtoClass) {
        if (dtoClass == null) {
            throw new GeDARuntimeException("dtoClass must not be null");
        }
        final int hash = dtoClass.hashCode();
        if (contexts.containsKey(hash)) {
            return contexts.get(hash);
        }
View Full Code Here

    }

    /** {@inheritDoc} */
    public DtoContext dto(final Object dtoInstance) {
        if (dtoInstance == null) {
            throw new GeDARuntimeException("dtoInstance must not be null");
        }
        return dto(dtoInstance.getClass());
    }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.exception.GeDARuntimeException

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.