File tree Expand file tree Collapse file tree 4 files changed +42
-42
lines changed
mcp-json-jackson/src/main/java/io/modelcontextprotocol/json
mcp-json/src/main/java/io/modelcontextprotocol/json Expand file tree Collapse file tree 4 files changed +42
-42
lines changed Original file line number Diff line number Diff line change @@ -15,25 +15,24 @@ public final class JacksonMcpJsonMapper implements McpJsonMapper {
1515
1616 private final ObjectMapper objectMapper ;
1717
18- /**
19- * Constructs a new JacksonMcpJsonMapper instance with the given ObjectMapper.
20- *
21- * @param objectMapper the ObjectMapper to be used for JSON serialization and deserialization.
22- * Must not be null.
23- * @throws IllegalArgumentException if the provided ObjectMapper is null.
24- */
18+ /**
19+ * Constructs a new JacksonMcpJsonMapper instance with the given ObjectMapper.
20+ * @param objectMapper the ObjectMapper to be used for JSON serialization and
21+ * deserialization. Must not be null.
22+ * @throws IllegalArgumentException if the provided ObjectMapper is null.
23+ */
2524 public JacksonMcpJsonMapper (ObjectMapper objectMapper ) {
2625 if (objectMapper == null ) {
2726 throw new IllegalArgumentException ("ObjectMapper must not be null" );
2827 }
2928 this .objectMapper = objectMapper ;
3029 }
3130
32- /**
33- * Returns the underlying Jackson {@link ObjectMapper} used for JSON serialization and deserialization.
34- *
35- * @return the ObjectMapper instance
36- */
31+ /**
32+ * Returns the underlying Jackson {@link ObjectMapper} used for JSON serialization and
33+ * deserialization.
34+ * @return the ObjectMapper instance
35+ */
3736 public ObjectMapper getObjectMapper () {
3837 return objectMapper ;
3938 }
Original file line number Diff line number Diff line change 44import io .modelcontextprotocol .json .McpJsonMapperSupplier ;
55
66/**
7- * A supplier of {@link McpJsonMapper} instances that uses the Jackson library for JSON serialization and deserialization.
7+ * A supplier of {@link McpJsonMapper} instances that uses the Jackson library for JSON
8+ * serialization and deserialization.
89 * <p>
9- * This implementation provides a {@link McpJsonMapper} backed by a Jackson {@link com.fasterxml.jackson.databind.ObjectMapper}.
10+ * This implementation provides a {@link McpJsonMapper} backed by a Jackson
11+ * {@link com.fasterxml.jackson.databind.ObjectMapper}.
1012 */
1113public class JacksonMcpJsonMapperSupplier implements McpJsonMapperSupplier {
1214
13- /**
14- * Returns a new instance of {@link McpJsonMapper} that uses the Jackson library for JSON serialization and deserialization.
15- * <p>
16- * The returned {@link McpJsonMapper} is backed by a new instance of {@link com.fasterxml.jackson.databind.ObjectMapper}.
17- *
18- * @return a new {@link McpJsonMapper} instance
19- */
15+ /**
16+ * Returns a new instance of {@link McpJsonMapper} that uses the Jackson library for
17+ * JSON serialization and deserialization.
18+ * <p>
19+ * The returned {@link McpJsonMapper} is backed by a new instance of
20+ * {@link com.fasterxml.jackson.databind.ObjectMapper}.
21+ * @return a new {@link McpJsonMapper} instance
22+ */
2023 @ Override
2124 public McpJsonMapper get () {
2225 return new JacksonMcpJsonMapper (new com .fasterxml .jackson .databind .ObjectMapper ());
Original file line number Diff line number Diff line change 1212 */
1313public class JacksonJsonSchemaValidatorSupplier implements JsonSchemaValidatorSupplier {
1414
15- /**
16- * Returns a new instance of {@link JsonSchemaValidator} that uses the Jackson library
17- * for JSON schema validation.
18- *
19- * @return A {@link JsonSchemaValidator} instance.
20- */
15+ /**
16+ * Returns a new instance of {@link JsonSchemaValidator} that uses the Jackson library
17+ * for JSON schema validation.
18+ * @return A {@link JsonSchemaValidator} instance.
19+ */
2120 @ Override
2221 public JsonSchemaValidator get () {
2322 return new DefaultJsonSchemaValidator ();
Original file line number Diff line number Diff line change @@ -11,16 +11,15 @@ public abstract class TypeRef<T> {
1111
1212 private final Type type ;
1313
14- /**
15- * Constructs a new TypeRef instance, capturing the generic type information
16- * of the subclass. This constructor should be called from an anonymous subclass
17- * to capture the actual type arguments. For example:
18- * <pre>
19- * TypeRef<List<Foo>> ref = new TypeRef<>(){};
20- * </pre>
21- *
22- * @throws IllegalStateException if TypeRef is not subclassed with actual type information
23- */
14+ /**
15+ * Constructs a new TypeRef instance, capturing the generic type information of the
16+ * subclass. This constructor should be called from an anonymous subclass to capture
17+ * the actual type arguments. For example: <pre>
18+ * TypeRef<List<Foo>> ref = new TypeRef<>(){};
19+ * </pre>
20+ * @throws IllegalStateException if TypeRef is not subclassed with actual type
21+ * information
22+ */
2423 protected TypeRef () {
2524 Type superClass = getClass ().getGenericSuperclass ();
2625 if (superClass instanceof Class ) {
@@ -29,11 +28,11 @@ protected TypeRef() {
2928 this .type = ((ParameterizedType ) superClass ).getActualTypeArguments ()[0 ];
3029 }
3130
32- /**
33- * Returns the captured type information.
34- *
35- * @return the Type representing the actual type argument captured by this TypeRef instance
36- */
31+ /**
32+ * Returns the captured type information.
33+ * @return the Type representing the actual type argument captured by this TypeRef
34+ * instance
35+ */
3736 public Type getType () {
3837 return type ;
3938 }
You can’t perform that action at this time.
0 commit comments