Package com.dooapp.fxform.reflection.impl

Examples of com.dooapp.fxform.reflection.impl.ReflectionFieldProvider


    private void createControllers() throws FormException {
        if (source.get() == null)
            return;
        controllers.clear();
        List<Field> fields = new ReflectionFieldProvider().getProperties(source.get());
        List<Element> elements = new LinkedList<Element>();
        ElementFactory elementFactory = new DefaultElementFactory();
        for (Field field : fields) {
            Element element = elementFactory.create(field);
            if (element != null) {
View Full Code Here


    private void createControllers() throws FormException {
        if (source.get() == null)
            return;
        controllers.clear();
        List<Field> fields = new ReflectionFieldProvider().getProperties(source.get());
        List<Element> elements = new LinkedList<Element>();
        ElementFactory elementFactory = new DefaultElementFactory();
        for (Field field : fields) {
            Element element = elementFactory.create(field);
            if (element != null) {
View Full Code Here

    private void createControllers() throws FormException {
        if (source.get() == null)
            return;
        controllers.clear();
        List<Field> fields = new ReflectionFieldProvider().getProperties(source.get());
        List<Element> elements = new LinkedList<Element>();
        ElementFactory elementFactory = new DefaultElementFactory();
        for (Field field : fields) {
            Element element = elementFactory.create(field);
            if (element != null) {
View Full Code Here

    private void createControllers() throws FormException {
        if (source.get() == null)
            return;
        controllers.clear();
        List<Field> fields = new ReflectionFieldProvider().getProperties(source.get());
        List<Element> elements = new LinkedList<Element>();
        ElementFactory elementFactory = new DefaultElementFactory();
        for (Field field : fields) {
            final Element element = elementFactory.create(field);
            if (element != null) {
View Full Code Here

    private final Object source;

    public ObjectPropertyObserver(Object source) {
        this.source = source;
        for (Field field : new ReflectionFieldProvider().getProperties(source)) {
            if (ObservableValue.class.isAssignableFrom(field.getType())) {
                try {
                    field.setAccessible(true);
                    ((ObservableValue) field.get(source)).addListener(this);
                } catch (IllegalAccessException e) {
View Full Code Here

     * Get a list of test fields based from TestBean.
     *
     * @return
     */
    public static List<Element> getTestFields() {
        List<Field> fields = new ReflectionFieldProvider().getProperties(new TestBean());
        List<Element> elements = new LinkedList<Element>();
        for (Field field: fields) {
            try {
                elements.add(new ReadOnlyPropertyFieldElement(field));
            } catch (FormException e) {
View Full Code Here

    public void testExtractExpectedFields()
            throws
            FormException, IllegalArgumentException {
        Bean1 bean1 = new Bean1();
        Bean2 bean2 = new Bean2();
        ReflectionFieldProvider reflectionFieldProvider = new ReflectionFieldProvider();
        List<String> include = new ArrayList<String>();
        include.add(Bean1.class.getName() + "-property");
        List<Field> fields = reflectionFieldProvider.getProperties(new MultipleBeanSource(bean1, bean2), include);
        Assert.assertEquals(1, fields.size());
        Assert.assertEquals(fields.get(0), ReflectionUtils.getFieldByName(Bean1.class, "property"));
    }
View Full Code Here

    private final Object source;

    public ObjectPropertyObserver(Object source) {
        this.source = source;
        for (Field field : new ReflectionFieldProvider().getProperties(source)) {
            if (ObservableValue.class.isAssignableFrom(field.getType())) {
                try {
                    field.setAccessible(true);
                    ((ObservableValue) field.get(source)).addListener(this);
                } catch (IllegalAccessException e) {
View Full Code Here

    private final String[] includes;

    private List<FieldFilter> filters;

    public DefaultElementProvider(String... includes) {
        this(new ReflectionFieldProvider(), includes);
    }
View Full Code Here

    private void createControllers() {
        if (source.get() == null)
            return;
        logger.info("Creating controllers for " + source.get());
        controllers.clear();
        List<Field> fields = new ReflectionFieldProvider().getProperties(source.get());
        for (FieldFilter filter : filters) {
            fields = filter.filter(fields);
        }
        for (Field field : fields) {
            try {
View Full Code Here

TOP

Related Classes of com.dooapp.fxform.reflection.impl.ReflectionFieldProvider

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.