Examples of FieldNotFoundException


Examples of com.alibaba.citrus.generictype.FieldNotFoundException

        Field field = null;

        try {
            field = declaringType.getRawType().getDeclaredField(name);
        } catch (Exception e) {
            throw new FieldNotFoundException(e);
        }

        return factory.getField(field, type);
    }
View Full Code Here

Examples of com.alibaba.citrus.generictype.FieldNotFoundException

        Field field = null;

        try {
            field = declaringType.getRawType().getDeclaredField(name);
        } catch (Exception e) {
            throw new FieldNotFoundException(e);
        }

        return factory.getField(field, type);
    }
View Full Code Here

Examples of com.jayway.awaitility.reflect.exception.FieldNotFoundException

        private Field foundField;

        public NameFieldSupplier() {
            foundField = WhiteboxImpl.getFieldAnnotatedWith(object, expectedAnnotation);
            if (!foundField.getType().isAssignableFrom(expectedFieldType)) {
                throw new FieldNotFoundException(String.format(
                        "Couldn't find a field of type %s annotated with %s in %s.", expectedFieldType.getClass()
                                .getName(), expectedAnnotation.getClass().getName(), WhiteboxImpl.getType(object)
                                .getName()
                ));
            }
View Full Code Here

Examples of com.jayway.awaitility.reflect.exception.FieldNotFoundException

         */
        public Callable<T> andAnnotatedWith(final Class<? extends Annotation> annotationType) {
            assertNotNullParameter(annotationType, "annotationType");
            Field field = WhiteboxImpl.getFieldAnnotatedWith(object, annotationType);
            if (!field.getName().equals(expectedFieldName)) {
                throw new FieldNotFoundException(String.format(
                        "Couldn't find a field with name %s annotated with %s in %s.", expectedFieldName,
                        annotationType.getClass().getName(), WhiteboxImpl.getType(object).getName()));
            }
            expectedAnnotation = annotationType;
            return this;
View Full Code Here

Examples of com.jayway.awaitility.reflect.exception.FieldNotFoundException

     * @param fieldName the field name
     * @param field     the field
     */
    public static void throwExceptionIfFieldWasNotFound(Class<?> type, String fieldName, Field field) {
        if (field == null) {
            throw new FieldNotFoundException("No field was found with name '" + fieldName + "' in class "
                    + type.getName() + ".");
        }
    }
View Full Code Here

Examples of com.jayway.awaitility.reflect.exception.FieldNotFoundException

    }

    /** {@inheritDoc} */
    @Override
    public void notFound(Class<?> type, boolean isInstanceField) throws FieldNotFoundException {
        throw new FieldNotFoundException(String.format(
                "No %s field named \"%s\" could be found in the class hierarchy of %s.", isInstanceField ? "instance"
                        : "static", fieldName, type.getName()));
    }
View Full Code Here

Examples of com.jayway.awaitility.reflect.exception.FieldNotFoundException

    }

    /** {@inheritDoc} */
    @Override
    public void notFound(Class<?> type, boolean isInstanceField) throws FieldNotFoundException {
        throw new FieldNotFoundException("No field with annotation of type \"" + annotation.getName()
                + "\" could be found in the class hierarchy of " + type.getName() + ".");
    }
View Full Code Here

Examples of com.jayway.awaitility.reflect.exception.FieldNotFoundException

    }

    /** {@inheritDoc} */
    @Override
    public void notFound(Class<?> type, boolean isInstanceField) throws FieldNotFoundException {
        throw new FieldNotFoundException(String.format(
                "No %s field with name \"%s\" and type \"%s\" could be found in the class hierarchy of %s.",
                isInstanceField ? "instance" : "static", fieldName, fieldType.getName(), type.getName()));
    }
View Full Code Here

Examples of com.jayway.awaitility.reflect.exception.FieldNotFoundException

    }

    /** {@inheritDoc} */
    @Override
    public void notFound(Class<?> type, boolean isInstanceField) throws FieldNotFoundException {
        throw new FieldNotFoundException(String.format(
                "No %s field of type \"%s\" could be found in the class hierarchy of %s.", isInstanceField ? "instance"
                        : "static", expectedFieldType.getName(), type.getName()));
    }
View Full Code Here

Examples of org.lilyproject.repository.api.FieldNotFoundException

    @Override
    public <T> T getField(SchemaId fieldId) throws FieldNotFoundException {
        QName qname = mapping.get(fieldId);
        if (qname == null) {
            throw new FieldNotFoundException(fieldId);
        }
        // The cast to (T) is only needed for a bug in JDK's < 1.6u24
        return (T)record.getField(qname);
    }
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.