Class WrappedComment.WrappedCommentResolver
java.lang.Object
net.darkhax.pricklemc.common.api.config.comment.WrappedComment.WrappedCommentResolver
- All Implemented Interfaces:
ICommentResolver
- Enclosing class:
WrappedComment
public static class WrappedComment.WrappedCommentResolver
extends Object
implements ICommentResolver
Resolves comments by wrapping the text to the specified width and optionally padding multi-line comments to the
maximum line length.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable WrappedCommentAttempts to resolve a comment for a config property using the available information.
-
Constructor Details
-
WrappedCommentResolver
public WrappedCommentResolver(int lineLength, boolean padLength)
-
-
Method Details
-
resolve
@Nullable public @Nullable WrappedComment resolve(Field field, @Nullable @Nullable Object value, Value valueMeta) throws IOException Description copied from interface:ICommentResolverAttempts to resolve a comment for a config property using the available information.- Specified by:
resolvein interfaceICommentResolver- 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.
-