util/src/main/java/io/github/huherto/springyRecords/RecordMapper.java
protected void initialize(Class<T> mappedClass) {
        this.mappedClass = mappedClass;
        this.mappedFields = new HashMap<String, Field>();

        Field fields[] = mappedClass.getFields();
        for (Field field : fields) {
            int mod = field.getModifiers();
            if (Modifier.isPublic(mod) && !Modifier.isStatic(mod)) {
                for(Annotation a: field.getAnnotations()) {
                    if (a.annotationType().isAssignableFrom(Column.class)) {
                        Column c = (Column)a;
                        String columnName = c.name();
                        mappedFields.put(columnName, field);
                    }
                }
            }
        }
    }
protected void initialize(Class<T> mappedClass) {
        this.mappedClass = mappedClass;
        this.mappedFields = new HashMap<String, Field>();

        Field fields[] = mappedClass.getFields();
        for (Field field : fields) {
            int mod = field.getModifiers();
            if (Modifier.isPublic(mod) && !Modifier.isStatic(mod)) {
                for(Annotation a: field.getAnnotations()) {
                    if (a.annotationType().isAssignableFrom(Column.class)) {
                        Column c = (Column)a;
                        String columnName = c.name();
                        mappedFields.put(columnName, field);
                    }
                }
            }
        }
    }
protected void initialize ( Class < T > mappedClass ) { this . mappedClass = mappedClass ; this . mappedFields = new HashMap < String , Field > ( ) ; Field fields [ ] = mappedClass . getFields ( ) ; for ( Field field : fields ) { int mod = field . getModifiers ( ) ; if ( Modifier . isPublic ( mod ) && ! Modifier . isStatic ( mod ) ) { for ( Annotation a : field . getAnnotations ( ) ) { if ( a . annotationType ( ) . isAssignableFrom ( Column . class ) ) { Column c = ( Column ) a ; String columnName = c . name ( ) ; mappedFields . put ( columnName , field ) ; } } } } }
Initialize the mapping metadata for the given class.
@param mappedClass the mapped class.
Initialize the mapping metadata for the given class .