Package org.apache.tapestry5.ioc.util

Examples of org.apache.tapestry5.ioc.util.UnknownValueException


                {
                    ids.add(child.getId());
                }
            }

            throw new UnknownValueException(String.format("Component %s does not contain embedded component '%s'.",
                    getCompleteId(), embeddedId), new AvailableValues("Embedded components", ids));
        }

        return embeddedElement;
    }
View Full Code Here


        String message = String.format(
                "A component event handler method returned the value %s. Return type %s can not be handled.", value,
                PlasticUtils.toTypeName(value.getClass()));

        throw new UnknownValueException(message, new AvailableValues("Configured return types", names));
    }
View Full Code Here

                if (list != null && !list.isEmpty())
                    types.add(e.getKey());
            }

            throw new UnknownValueException(String.format("No object of type %s is available from the Environment.", type.getName()),
                    new AvailableValues("Environmentals",
                            F.flow(typeToStack.entrySet()).remove(new Predicate<Entry<Class, LinkedList>>()
                            {
                                public boolean accept(Entry<Class, LinkedList> element)
                                {
View Full Code Here

            if (adapter == null)
            {
                final List<String> names = classAdapter.getPropertyNames();
                final String className = activeClass.getName();
                throw new UnknownValueException(String.format(
                        "Class %s does not contain a property (or public field) named '%s'.", className, propertyName),
                        new AvailableValues("Properties (and public fields)", names));
            }
            return adapter;
        }
View Full Code Here

    private Module locateModuleForService(String serviceId)
    {
        Module module = serviceIdToModule.get(serviceId);

        if (module == null)
            throw new UnknownValueException(String.format("Service id '%s' is not defined by any module.", serviceId),
                    new AvailableValues("Defined service ids", serviceIdToModule));

        return module;
    }
View Full Code Here

            return null;

        T result = stringToEnum.get(input);

        if (result == null)
            throw new UnknownValueException(PublicUtilMessages
                    .missingEnumValue(input, enumClass, stringToEnum.keySet()), new AvailableValues(enumClass.getName()
                    + " enum constants", stringToEnum));

        return result;
    }
View Full Code Here

                {
                    ids.add(child.getId());
                }
            }

            throw new UnknownValueException(String.format("Component %s does not contain embedded component '%s'.",
                    getCompleteId(), embeddedId), new AvailableValues("Embedded components", ids));
        }

        return embeddedElement;
    }
View Full Code Here

            if (adapter == null)
            {
                final List<String> names = classAdapter.getPropertyNames();
                final String className = activeClass.getName();
                throw new UnknownValueException(String.format(
                        "Class %s does not contain a property (or public field) named '%s'.", className, propertyName),
                        new AvailableValues("Properties (and public fields)", names));
            }
            return adapter;
        }
View Full Code Here

                {
                    ids.add(child.getId());
                }
            }

            throw new UnknownValueException(String.format("Component %s does not contain embedded component '%s'.",
                    getCompleteId(), embeddedId), new AvailableValues("Embedded components", ids));
        }

        return embeddedElement;
    }
View Full Code Here

        }

        // Not found anywhere. Identify the source and target type and a (sorted) list of
        // all the known coercions.

        throw new UnknownValueException(String.format("Could not find a coercion from type %s to type %s.",
                sourceType.getName(), targetType.getName()), buildCoercionCatalog());
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.util.UnknownValueException

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.