cz.jalasoft.util.configuration.key.PropertyKeyExtractors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JalasoftUtils Show documentation
Show all versions of JalasoftUtils Show documentation
A collection of utility classes that might be useful.
The newest version!
package cz.jalasoft.util.configuration.key;
/**
* @author Honza Lastovicka ([email protected])
* @since 2016-08-16.
*/
public abstract class PropertyKeyExtractors {
public static PropertyKeyExtractor methodName() {
return m -> m.getName();
}
public static PropertyKeyExtractor getterExtractingOr(PropertyKeyExtractor extractor) {
return new GetterPropertyKeyExtractorDecorator(extractor);
}
public static PropertyKeyExtractor keyAnnotationValueOr(PropertyKeyExtractor extractor) {
return new AnnotatedPropertyKeyExtractorDecorator(extractor);
}
public static PropertyKeyExtractor prefixAnnotationAwareAnd(PropertyKeyExtractor extractor) {
return new PrefixedPropertyKeyExtractorDecorator(extractor);
}
}