Package org.fest.reflect.exception

Examples of org.fest.reflect.exception.ReflectionError


      if (innerClass.getName().equals(expectedInnerClassName)) {
        return innerClass;
      }
    }
    String format = "Failed to find static inner class %s in %s";
    throw new ReflectionError(String.format(format, innerClassName, declaringClass.getName()));
  }
View Full Code Here


  public Class<?> load() {
    try {
      return loadType();
    } catch (Throwable t) {
      String format = "Unable to load class '%s' using ClassLoader %s";
      throw new ReflectionError(String.format(format, name, classLoader), t);
    }
  }
View Full Code Here

    checkNotNull(superType);
    try {
      return checkNotNull(loadType().asSubclass(superType));
    } catch (Throwable t) {
      String format = "Unable to load class '%s' as %s using ClassLoader %s";
      throw new ReflectionError(String.format(format, name, superType.getName(), classLoader), t);
    }
  }
View Full Code Here

    try {
      this.constructor = target.getDeclaredConstructor(parameterTypes);
    } catch (Throwable t) {
      String format = "Failed to find constructor in type %s with parameter types %s";
      String msg = String.format(format, target.getName(), toStringOf(parameterTypes));
      throw new ReflectionError(msg);
    }
  }
View Full Code Here

    } catch (Throwable t) {
      Throwable cause = targetOf(t);
      if (cause instanceof RuntimeException) {
        throw (RuntimeException) cause;
      }
      throw new ReflectionError("Unable to create a new object from the enclosed constructor", cause);
    } finally {
      setAccessibleIgnoringExceptions(c, accessible);
    }
  }
View Full Code Here

TOP

Related Classes of org.fest.reflect.exception.ReflectionError

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.