
com.develhack.lombok.javac.handlers.assertion.InRangeHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of develhacked-lombok Show documentation
Show all versions of develhacked-lombok Show documentation
The library enhancing Java classes at compilation by annotations that contained in the Develhack Core Library.
The newest version!
package com.develhack.lombok.javac.handlers.assertion;
import java.util.HashMap;
import java.util.Map;
import lombok.javac.JavacAnnotationHandler;
import org.mangosdk.spi.ProviderFor;
import com.develhack.annotation.assertion.InRange;
@ProviderFor(JavacAnnotationHandler.class)
public class InRangeHandler extends AbstractThresholdAssertionHandler {
public InRangeHandler() {
super(InRange.class);
}
@Override
protected String getCheckMethodName() {
return nullable ? "checkInRangeIfNonnull" : "checkInRange";
}
@Override
protected Map getAdditionalConditionMap() {
InRange inRange = annotationValues.getInstance();
Map additionalCondtionMap = new HashMap(2);
additionalCondtionMap.put("from", inRange.from());
additionalCondtionMap.put("to", inRange.to());
return additionalCondtionMap;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy