All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.content.commons.mappingcontext.ClassWalker Maven / Gradle / Ivy

There is a newer version: 3.0.15
Show newest version
package org.springframework.content.commons.mappingcontext;

import java.lang.reflect.Field;

public class ClassWalker {

    private Class klazz;

    public ClassWalker(Class klazz) {
        this.klazz = klazz;
    }

    public void accept(ContentPropertyBuilderVisitor visitor) {

        boolean fContinue = true;

        fContinue &= visitor.visitClass(klazz);
        if (!fContinue) {
            return;
        }

        Field[] fields = this.klazz.getDeclaredFields();
        for (Field field : fields) {
            fContinue &= visitor.visitField(field);
        }
        if (!fContinue) {
            return;
        }

        visitor.visitClassEnd(klazz);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy