net.jbock.annotated.ExecutableParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbock-compiler Show documentation
Show all versions of jbock-compiler Show documentation
jbock annotation processor
package net.jbock.annotated;
import net.jbock.Parameters;
import net.jbock.common.EnumName;
import javax.lang.model.element.ExecutableElement;
import java.util.List;
import java.util.Optional;
import static net.jbock.annotated.AnnotatedParameters.createParameters;
import static net.jbock.common.Constants.optionalString;
final class ExecutableParameters extends Executable {
private final Parameters parameters;
ExecutableParameters(ExecutableElement method, Parameters parameters) {
super(method);
this.parameters = parameters;
}
@Override
AnnotatedMethod annotatedMethod(EnumName enumName) {
return createParameters(this, enumName);
}
@Override
Optional descriptionKey() {
return optionalString(parameters.descriptionKey());
}
@Override
List description() {
return List.of(parameters.description());
}
Optional paramLabel() {
return optionalString(parameters.paramLabel());
}
}