Interface ICommentResolver
- All Known Implementing Classes:
WrappedComment.WrappedCommentResolver
public interface ICommentResolver
Comment resolvers are responsible for generating an
IComment from a config property. Comment resolvers can
resolve to a different comment implementation or even wrap or decorate them with additional info.-
Method Summary
-
Method Details
-
resolve
@Nullable @Nullable IComment resolve(Field field, @Nullable @Nullable Object value, Value valueMeta) throws IOException Attempts to resolve a comment for a config property using the available information.- Parameters:
field- The field being mapped.value- The value of the field.valueMeta- The value annotation metadata.- Returns:
- The comment that was resolved. Null may be returned when the comment could not be resolved.
- Throws:
IOException- An exception may be thrown if fatal errors are encountered while resolving the comment.
-
hasComment
Checks if a comment has been defined for the value.- Parameters:
valueMeta- The value metadata annotation.- Returns:
- If the value has a comment.
-