Package org.apache.isis.core.metamodel.exceptions

Examples of org.apache.isis.core.metamodel.exceptions.MetaModelException


    }

    @Override
    public void introspectTypeHierarchyAndMembers() {
        if (facetedMethodsBuilder == null) {
            throw new MetaModelException("Introspection already taken place, cannot introspect again");
        }

        // class
        facetedMethodsBuilder.introspectClass();
View Full Code Here


            throw e;
        } catch (final InvocationTargetException e) {
            invocationException("Exception executing " + method, e);
            return null;
        } catch (final IllegalAccessException e) {
            throw new MetaModelException("illegal access of " + method, e);
        }
    }
View Full Code Here

            throw new IsisApplicationException(targetException);
        }
        if (targetException instanceof RuntimeException) {
            throw (RuntimeException) targetException;
        } else {
            throw new MetaModelException(targetException);
        }
    }
View Full Code Here

            protectMethodReturnValue = (Boolean) InvokeUtils.invokeStatic(protectMethod);
        } catch (final ClassCastException ex) {
            // ignore
        }
        if (protectMethodReturnValue == null) {
            throw new MetaModelException("method " + protectMethod + "must return a boolean");
        }
        return protectMethodReturnValue;
    }
View Full Code Here

        if (!indicatesOptional(optionalMethod)) {
            return;
        }
        if (returnType.isPrimitive()) {
            throw new MetaModelException(cls.getName() + "#" + capitalizedName
                + " cannot be an optional property as it is of a primitive type");
        }
        final FacetHolder property = processMethodContext.getFacetHolder();
        FacetUtil.addFacet(new MandatoryFacetOptionalViaMethodForProperty(property));
    }
View Full Code Here

                optionalMethodReturnValue = (Boolean) InvokeUtils.invoke(method, new Object[0]);
            } catch (final ClassCastException ex) {
                // ignore
            }
            if (optionalMethodReturnValue == null) {
                throw new MetaModelException("method " + method + " should return a boolean");
            }
            return optionalMethodReturnValue.booleanValue();
        }
        return false;
    }
View Full Code Here

            description = (String) InvokeUtils.invokeStatic(descriptionMethod);
        } catch (final ClassCastException ex) {
            // ignore
        }
        if (description == null) {
            throw new MetaModelException("method " + descriptionMethod + "must return a string");
        }
        return description;
    }
View Full Code Here

            alwaysHideMethodReturnValue = (Boolean) InvokeUtils.invokeStatic(alwaysHideMethod);
        } catch (final ClassCastException ex) {
            // ignore
        }
        if (alwaysHideMethodReturnValue == null) {
            throw new MetaModelException("method " + alwaysHideMethod + "must return a boolean");
        }
        return alwaysHideMethodReturnValue;
    }
View Full Code Here

            name = (String) InvokeUtils.invokeStatic(nameMethod);
        } catch (final ClassCastException e) {
            // ignore
        }
        if (name == null) {
            throw new MetaModelException("method " + nameMethod + "must return a string");
        }
        return name;
    }
View Full Code Here

            names = (String[]) InvokeUtils.invokeStatic(namesMethod, new Object[0]);
        } catch (final ClassCastException ex) {
            // ignore
        }
        if (names == null || names.length != numElementsRequired) {
            throw new MetaModelException(namesMethod
                + " must return an String[] array of same size as number of parameters of action");
        }
        return names;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.exceptions.MetaModelException

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.