Package org.pirkaengine.core

Examples of org.pirkaengine.core.ModelDeficientPropertyException


                    return field.get(aModel);
                }
            } catch (NoSuchFieldException e) {
                // do nothing
            } catch (IllegalAccessException e) {
                throw new ModelDeficientPropertyException("field: " + key, e);
            } catch (RuntimeException e) {
                throw new ModelDeficientPropertyException("field: " + key, e);
            }
            String getterMethod = "get" + Character.toUpperCase(key.charAt(0)) + key.substring(1);
            try {
                Method getter = modelClass.getMethod(getterMethod);
                if (getter != null && Modifier.isPublic(getter.getModifiers())) {
                    return getter.invoke(aModel);
                }
            } catch (NoSuchMethodException e) {
                // do nothing
            } catch (InvocationTargetException e) {
                throw new ModelDeficientPropertyException("getter method: " + getterMethod, e);
            } catch (IllegalAccessException e) {
                throw new ModelDeficientPropertyException("getter method: " + getterMethod, e);
            } catch (RuntimeException e) {
                throw new ModelDeficientPropertyException("getter method: " + getterMethod, e);
            }
            try {
                Method method = modelClass.getMethod(key);
                if (method != null && Modifier.isPublic(method.getModifiers())) {
                    return method.invoke(aModel);
                }
            } catch (NoSuchMethodException e) {
                // do nothing
            } catch (InvocationTargetException e) {
                throw new ModelDeficientPropertyException("method: " + key, e);
            } catch (IllegalAccessException e) {
                throw new ModelDeficientPropertyException("method: " + key, e);
            } catch (RuntimeException e) {
                throw new ModelDeficientPropertyException("method: " + key, e);
            }
            throw new ModelDeficientPropertyException("key: " + key);
        }
View Full Code Here

TOP

Related Classes of org.pirkaengine.core.ModelDeficientPropertyException

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.