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

cz.jalasoft.util.configuration.key.PropertyKeyExtractors Maven / Gradle / Ivy

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy