Skip to content

Commit

Permalink
[#1401] minor javadoc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Mar 1, 2022
1 parent 1f418c1 commit 92a4c7a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -5022,25 +5022,23 @@ public interface IVersionProvider {
}

/**
* Converter which can be used in case when picocli should use default convert. For example this can be used in maps:
*
* Converter that can be used to signal to picocli that it should use the default converter.
* This can be useful with maps:
* <pre>
* class App {
* &#064;Option(names = "-D", converter = {UseDefaultConverter.class, GenericValueConverter.class})
* Map&lt;String, GenericValue&lt;?&gt;&gt; values;
* }
* </pre>
*
* Instances of this class will throw UnsupportedOperationException for {@link #convert(String)} method.
* The {@link #convert(String)} method of this class always throws an UnsupportedOperationException.
* @since 4.7.0
*/
public static final class UseDefaultConverter implements ITypeConverter<Object> {

/**
* Always throws UnsupportedOperationException.
* @throws UnsupportedOperationException always
*/
/** Always throws UnsupportedOperationException.
* @throws UnsupportedOperationException always */
public Object convert(String value) throws Exception {
throw new UnsupportedOperationException("This convert should never be called.");
throw new UnsupportedOperationException("This method should never be called.");
}
}

Expand Down

0 comments on commit 92a4c7a

Please sign in to comment.