com.github.leeonky.util.DefaultProperty Maven / Gradle / Ivy
The newest version!
package com.github.leeonky.util;
import static java.lang.String.format;
class DefaultProperty implements Property {
private final String name;
private final BeanClass beanType;
public DefaultProperty(String name, BeanClass beanType) {
this.name = name;
this.beanType = beanType;
}
@Override
public String getName() {
return name;
}
@Override
public BeanClass getBeanType() {
return beanType;
}
@Override
public PropertyReader getReader() {
return beanType.getPropertyReader(name);
}
@Override
public PropertyWriter getWriter() {
return beanType.getPropertyWriter(name);
}
@Override
public String toString() {
return format("%s.%s", beanType.getName(), name);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy