Examples of ReflectException


Examples of org.openbp.common.ReflectException

  public void addShallowMapping(String fromName, String toName)
  {
    Class to = ReflectUtil.loadClass(toName);
    if (to == null)
    {
      throw new ReflectException(MsgFormat.format("Result class $0 for class mapping not found.", toName));
    }

    registry.register(fromName, to);
  }
View Full Code Here

Examples of org.openbp.common.ReflectException

  public void addDeepMapping(String fromName, String toName)
  {
    Class from = ReflectUtil.loadClass(fromName);
    if (from == null)
    {
      throw new ReflectException(MsgFormat.format("Mapped class $0 for class mapping not found.", fromName));
    }

    Class to = ReflectUtil.loadClass(toName);
    if (to == null)
    {
      throw new ReflectException(MsgFormat.format("Result class $0 for class mapping not found.", toName));
    }

    registry.registerByClass(from, to);
  }
View Full Code Here

Examples of wecui.exception.ReflectException

                field.setAccessible(true);
            }
            field.set(object, unwrap(value));
            return this;
        } catch (Exception e) {
            throw new ReflectException(e);
        }
    }
View Full Code Here

Examples of wecui.exception.ReflectException

            if (!field.isAccessible()) {
                field.setAccessible(true);
            }
            return on(field.get(object));
        } catch (Exception e) {
            throw new ReflectException(e);
        }
    }
View Full Code Here

Examples of wecui.exception.ReflectException

                if (method.getName().equals(name) && match(method.getParameterTypes(), types)) {
                    return on(method, object, args);
                }
            }

            throw new ReflectException(e);
        }
    }
View Full Code Here

Examples of wecui.exception.ReflectException

                if (match(constructor.getParameterTypes(), types)) {
                    return on(constructor, args);
                }
            }

            throw new ReflectException(e);
        }
    }
View Full Code Here

Examples of wecui.exception.ReflectException

     */
    private static Reflect on(Constructor<?> constructor, Object... args) throws ReflectException {
        try {
            return on(constructor.newInstance(args));
        } catch (Exception e) {
            throw new ReflectException(e);
        }
    }
View Full Code Here

Examples of wecui.exception.ReflectException

                return on(object);
            } else {
                return on(method.invoke(object, args));
            }
        } catch (Exception e) {
            throw new ReflectException(e);
        }
    }
View Full Code Here

Examples of wecui.exception.ReflectException

     */
    private static Class<?> forName(String name) throws ReflectException {
        try {
            return Class.forName(name);
        } catch (Exception e) {
            throw new ReflectException(e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.