Package com.dooapp.fxform.model.impl

Examples of com.dooapp.fxform.model.impl.PropertyMethodElement


        if (field.getDeclaringClass().isAnnotationPresent(Accessor.class)
                && (Accessor.AccessType.METHOD == field.getDeclaringClass().getAnnotation(Accessor.class).value())) {
            try {
                Method method = field.getDeclaringClass().getMethod(field.getName());
                if (Property.class.isAssignableFrom(method.getReturnType())) {
                    return new PropertyMethodElement(method);
                } else {
                    return new ReadOnlyPropertyMethodElement(method);
                }
            } catch (NoSuchMethodException e) {
                logger.log(Level.FINE, "No method accessor for " + field.getName());
View Full Code Here


        Element element = null;
        if (field.getDeclaringClass().isAnnotationPresent(Accessor.class)
                && (Accessor.AccessType.METHOD == field.getDeclaringClass().getAnnotation(Accessor.class).value())) {
            if (Property.class.isAssignableFrom(field.getType())) {
                try {
                    element = new PropertyMethodElement(field);
                } catch (NoSuchMethodException e) {
                    logger.log(Level.INFO, "No property getter found for " + field);
                }
            } else {
                try {
View Full Code Here

        }
    }

    @Test
    public void testGetAnnotationFormMethod() throws NoSuchFieldException, NoSuchMethodException {
        PropertyMethodElement propertyMethodElement = new PropertyMethodElement(TestBean.class.getDeclaredField("test"));
        Assert.assertNotNull(propertyMethodElement.getAnnotation(NonVisual.class));
    }
View Full Code Here

        Assert.assertNotNull(propertyMethodElement.getAnnotation(NonVisual.class));
    }

    @Test
    public void testFallbackOnField() throws NoSuchFieldException, NoSuchMethodException {
        PropertyMethodElement propertyMethodElement = new PropertyMethodElement(TestBean2.class.getDeclaredField("test"));
        Assert.assertNotNull(propertyMethodElement.getAnnotation(NonVisual.class));
    }
View Full Code Here

        Element element = null;
        if (field.getDeclaringClass().isAnnotationPresent(Accessor.class)
                && (Accessor.AccessType.METHOD == field.getDeclaringClass().getAnnotation(Accessor.class).value())) {
            if (Property.class.isAssignableFrom(field.getType())) {
                try {
                    element = new PropertyMethodElement(field);
                } catch (NoSuchMethodException e) {
                    logger.log(Level.INFO, "No property getter found for " + field);
                    throw new FormException(e);
                }
            } else {
View Full Code Here

        if (field.getDeclaringClass().isAnnotationPresent(Accessor.class)
                && (Accessor.AccessType.METHOD == field.getDeclaringClass().getAnnotation(Accessor.class).value())) {
            try {
                Method method = field.getDeclaringClass().getMethod(field.getName());
                if (Property.class.isAssignableFrom(method.getReturnType())) {
                    return new PropertyMethodElement(method);
                } else {
                    return new ReadOnlyPropertyMethodElement(method);
                }
            } catch (NoSuchMethodException e) {
                logger.log(Level.FINE, "No method accessor for " + field.getName());
View Full Code Here

TOP

Related Classes of com.dooapp.fxform.model.impl.PropertyMethodElement

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.