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

com.github.leeonky.util.FieldPropertyAccessor Maven / Gradle / Ivy

The newest version!
package com.github.leeonky.util;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Type;

abstract class FieldPropertyAccessor extends AbstractPropertyAccessor {
    final Field field;

    FieldPropertyAccessor(BeanClass beanClass, Field field) {
        super(beanClass);
        this.field = field;
    }

    @Override
    public String getName() {
        return field.getName();
    }

    @Override
    public  A getAnnotation(Class annotationClass) {
        return AnnotationGetter.getInstance().getAnnotation(field, annotationClass);
    }

    @Override
    protected Type provideGenericType() {
        return field.getGenericType();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy